GO Programming Language

David Palacios
3 min readMay 11, 2021

As I was daydreaming during the day, a thought popped in my head. I was wondering if Google had their own programing language. They have their own cloud service, database, authentication, etc etc. It would be crazy if they didn't have a programming language if you think about it. But after doing my research I found out Google do have their own programing language. It is called GO. GO is a statically typed, compiled programming language designed by Robert Griesemer, Rob Pike, and Ken Thompson. Go is syntactically similar to C programming language (C programming is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system). Go uses “goroutines” which is another meaning for lightweight processes, in which it allows further efficiencies.

Benefits of GO

  • Quick compilation and execution speed
  • No virtual machine needed
  • Portability
  • Lightweight goroutines that support concurrency

Drawbacks of Go

  • Does not support generics, or the ability to write abstract, implicit code
  • Lack of runtime safety
  • Enforces strict rules
  • Incompatible with function overloading
  • Not conventionally object-oriented
  • Extensive built-in libraries

Syntax of GO

A Go program consist of various tokens. A token in Go program is either a keyword, an identifier, a constant, a string literal, or a symbol. The example below is a Go statement that consist of 6 tokens.

You are probably wondering what are the 6 tokens? Well the 6 tokens are

1.fmt
2. .
3. Println
4. (
5. “Hello, World!”
6. )

Comments

Comment starts with /* and endswith the characters */

Function

Below is an example of a function in GO.

Inside a function, the := short assignment statement can be used in place of a var declaration with implicit type. But outside a function, every statement begins with a keyword var, func, and so on. So the := construct is not available to use.

Keywords

Below is an example of keywords used in GO.

Conclusion

As Im close to the end of immersion, I’m starting to research more about other program languages. Go popped up when i researched if Google created their own programming language. Which is pretty cool. I also learned once you learn Javascript, learning other programming languages will not be difficult as I thought it would be. It will be fun to learn more about GO.

Sources:

--

--