DEV Community

Kaamkiya
Kaamkiya

Posted on • Edited on

Go is awesome!

My favorite coding language is Go. Here's why!

Statically typed

Go is a statically typed language. This means that once a variable has been declared, its type cannot change. For example, x := 4 means that x is now 4. If I were to change this to a string, it would fail.

Concise

Hello world in Java is extremely complex:

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
Enter fullscreen mode Exit fullscreen mode

Although Python is simpler, Go is still not nearly as verbose as Java:

package main

func main() {
    println("Hello, World!")
}
Enter fullscreen mode Exit fullscreen mode

camelCase

I get that some people prefer snake_case to camelCase, but I like camelCase. And seeing as most of the other languages I use are supposed to use snake_case, it's nice to use camelCase every so often.

Easy to learn

Alright, sure, I tried like ten languages before settling on Go, so I did have experience. However, it's still extremely easy to learn. It took me about two days to figure out how to do most things, which was fairly quick, and I loved it.

Other

  • Go is a compiled language, making it extremely rapid.
  • It comes with a built-in formatter (go fmt <filename>)
  • It's new-ish, so the developers learnt from other languages' mistakes
  • It has a wide variety of applications, from webdev to CLI apps.

Have you tried Go? Did you like it?

Top comments (14)

Collapse
 
michalispapamichael profile image
Michalis Papamichael • Edited

Read the first few sections of this to get a good grasp of the advantages of Go
dave.cheney.net/practical-go/prese...
. Although that's a good blog for Go

Collapse
 
monfernape profile image
Usman Khalil

This is amazing. Thank you for sharing these.

Collapse
 
ranjancse profile image
Ranjan Dailata

Top 10 "Go" Programming features.

  • Simplicity
  • Concurrency Support
  • Strong Typing
  • Garbage Collection
  • Cross-Platform Support
  • Fast Compilation
  • Standard Library
  • Error Handling
  • Open-Source Community
  • Tooling
Collapse
 
kaamkiya profile image
Kaamkiya

I kept hearing about concurrency without having a clue what it is. I finally looked it up, and now it makes sense.

Collapse
 
codingjlu profile image
codingjlu

Yep, always wanted to get into Go. I just want to say that, Go isn't that young, it's the same age as Node ;)

Collapse
 
kaamkiya profile image
Kaamkiya

That's true. Relatively to other languages, though, it's roughly a quarter of their age. (I found the average of Java, JS, Python, C, C++, and C#'s ages.)

Collapse
 
lnahrf profile image
Lev N.

I heard a lot of good things about Go, and a lot of bad things, such as the use of a non-standard date system. Maybe one day Iโ€™ll give it a shot, although from my understanding Go does not have something it particularily excels in (correct me if Iโ€™m wrong).

Collapse
 
kaamkiya profile image
Kaamkiya • Edited

I think Go's original purpose was to get stuff done more easily and faster. From what I've seen and read, one of the most common reasons for using Go is CLI apps. Even GitHub's CLI is built entirely in Go.

Collapse
 
lnahrf profile image
Lev N.

What are the benefits of Go when it comes to writing CLI apps? How is it different than any other language?

Thread Thread
 
kaamkiya profile image
Kaamkiya

I don't know, it just seems to be commonly used for them. Also, it's compiled, so it can be very fast.

Thread Thread
 
lnahrf profile image
Lev N.

Wellโ€ฆ a lot of languages are compiled.

Collapse
 
raguay profile image
Richard Guay

I love using go with Wails

Collapse
 
calinzbaenen profile image
Calin Baenen

How do you feel about Rust?

Collapse
 
kaamkiya profile image
Kaamkiya

I've played with it before. It's cool, but I still prefer Go