Did you ever heard about Go?

Should I learn to code in Go?

I am sure a lot of you did have the question at some point:
Which language is better?
What programming/scripting language should I use?
maybe you compared them X vs Y pros and cons

There are a lot of articles out there, that try to tackle this. I do not like to compare two languages, because they can be very different in their core. The short answer to the above question is, It depends on the use-case, skill and motivations.

I did use PHP for a lot of years to create web applications. Is PHP a good choice? For starters, PHP is a scripting language, so generally, it is not a bad choice. Scripting languages are easy to learn and you have a pretty fast learning curve. You are able to get a feel of it in a short time period.

There is a big community out there, that uses PHP daily, you can find a lot of tutorials. There are a lot of ready-made frameworks to use. Simply said, it is painless to create products using PHP. Some of the most popular platforms available use PHP. To mention a few OSS, like WordPress, Joomla, Drupal, phpBB and others.

I think this is also the issue in my opinion. After a couple years of using it and developing stuff, I got to a point, that I was constantly rewriting things. I was working on a project, started with one framework, then I saw something different, and I was starting to rewrite it. I was never satisfied with what I was working with and always found something new. Something more interesting.

This was going on for a long time by that time. I was never satisfied with the end result. It simply did not feel like it. I was frustrated, because I could not complete anything to the end, and I was always undecided.

At this point, I did found Go. I think someone did mention it to me, but I do not remember anymore. It was approximately 4 years ago. I’ve heard about this — for me unknown language — Go (or Golang). I’ve gone through the website and I must admit, I was not convinced at first.

A statically typed language, made by Google, advertised with catchphrases like this:

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher

My mind was blown, how can something be simple, reliable and also efficient at once. I had to try it and see what this was about. On the page they had some nice examples, also a playground where you could easily try your code. All of these were really fast and to my surprise, the code was understandable just by looking.

I mean, the syntax was also kind of familiar in places, but unknown in others. I’ve seen traces of C and maybe C++ in it and others syntax which I was not familiar with, but I knew I’ve seen it somewhere already.

After a few struggles and roadblocks, today I like Go very much. It turned out to be a good choice to move on from PHP.

No PHP processors anymore. Nothing needs to be set in the php.ini file. I just build a binary, which is less effort than all the dependencies that would be otherwise needed (for PHP: apache, php-fpm, some mysql drivers, etc. a lot of config tasks).

Go allows you to compile for any major platform, without the need to have that platform used for compilation. It builds you a small binary, that can be run with a high confidence. No more dependencies anymore!

Building software in statically typed languages like Go is of course not easy in comparison to a scripting language. You have to adhere to the high standards set by the compiler. No unused variables, no more mistaken assignments of strings to integer variables.

I think that the Go code is also more readable. If I’ve found any library or module for Go on Github, I had no issue understanding what the code does. I am not able to tell the same about a Java plugin for example. This makes working with Go also satisfying.

I just wanted to motivate you, if you are planning to learn something new and are undecided on what to choose, I think Go could be a good choice for you! A good choice, that you will not regret!

Richard Szolár
Richard Szolár
Software Developer

Software developer with many years of experience. Tech enthusiasts, recently working with Go and React. Also reading a lot of 📚 and I ❤️ art 🍿🎬