What are the main characteristics of the Go language?

9

I started to hear a lot about GoLang and it is increasingly gaining ground among the most used programming languages.

As far as I know, I think it's a programming language. So,

  • What are the key features?
  • Can I program and run on any operating system?
  • How do the types work on it?
  • What was the purpose of your creation?

If anyone can give me a basic idea about GoLang.

    
asked by anonymous 08.08.2017 / 17:04

1 answer

14
  

What are the key features?

I will cite only what is most important.

It is a high level language, much more than C, similar to C #, for example. It is compiled and generates native executable.

Originally it was designed to be a language for system development and not so much for applications, but it did not really happen, so it's multi-purpose and is used in many things for the web, though it can be used for anything.

It is of the imperative paradigm, essentially. It is modular, has encapsulation and polymorphism. Although you can embark another type on a structure that is being created there is no inheritance mechanism. It avoids features that make it multi-paradigm. She prefers the most basic mechanisms.

Pointers are exposed even though you can not use them freely as in C. They are more like references.

The syntax is succinct as in Python, so it attracts programmers who want more performance.

It has a garbage collector so you do not have to worry too much about memory management. It has the drawbacks of this too. It is fast, but it does not reach the C level.

Work with an easy way to handle parallel and concurrent processing ( Channels ).

  

Can I schedule and run on any operating system?

No, no language can. It can run on: FreeBSD 8-STABLE, Linux 2.6.23, Mac OS X 10.8, Windows XP and higher versions, of course. There is some support for others, but it is not official.

  

How do the types work on it?

I'm not sure what you want to know, but typing is static, strong, secure, nominal, and structural , manifest or inferred according to need and taste. There is no hierarchy of types.

Of course I am sure to some extent. Because the language has no generic, the solution is often to produce less secure codes to avoid duplication of efforts. You can also challenge safety when there is structural typing where you can perform what you do not expect. So she has a certain feel of dynamic language without having all the advantages of it.

  

What was the purpose of your creation?

Originally being a C language better than C itself. Being safer and more powerful with a better syntax, with facilities for the compiler to solve everything quickly, without context, with facilities to analyze dependencies, and also simple for humans , it can not become Java or C ++. The creators refuse to put something that complicates the language and the compiler, which is a criticism that many do, since this prevents the creation of generics.

    
08.08.2017 / 17:20