Comparing Go with Other Languages is Wrong

Java is to Javascript like Car is to Carpet
Published on November 15, 2017
Go Programming Languages

About 5 minutes of reading.


TL;DR

“Java is to Javascript like Car is to Carpet.” - Collective Genius

My Computer Language is Better than Yours

Some programming languages were - let’s say - discovered over time, whereas others were created academically by carefully selecting the features that would provide solutions to a set of problems. There’s nothing terribly new about spawning programming languages. However, haters gonna hate and will always find one, in an office near you or over the Internet.

I’m not talking here about ranking languages. Comparing languages - that’s this note about.

In my morning routine, I’m reading a lot of articles on various subjects, mostly related with Go and Java : once a week, I get across an article that compares Go to Scala, Java, you name it.

Comparing programming languages is like going to kindergarten all over again. Kids start arguing over the language features without having a clue what led the authors of that programming language to make an option over another option. Complaining that Go has no generics is from that mindset, where a young mind doesn’t understand that Go is not object oriented, therefore there is no need for generics.

Go was an explicitly engineered language intended to solve problems with existing languages and tools while natively taking advantage of modern hardware architectures. It has been designed not only with teams of developers in mind, but also long-term maintainability. Comparing it to Java (which I know well) is wrong for the simple reason that they are designed in different ages of computing with different problems, hardware capabilities and needs.

The right tool for the right job

For me, understanding a programming language, framework or stack implies love and fun. If you are not having fun and you don’t love it, it might because you don’t understand it well enough, or you’re using it in a wrong way.

If they choose a screwdriver handler to hammer some nails, fine by me.

Convincing someone to jump from Java or Ruby to Go is not going to be achieved by comparing them. The influence by an example, diplomacy and the spread of your worldview would do a better job.

To give you an example, I have a good friend who is coding Rust these days. We came to agreement that Go and Rust are not competitors and found Dave Cheney’s opinion in the process. Last week I was presenting my friend with a few of Go advantages and he was impressed. Maybe he will give it a Go, maybe he wouldn’t. That doesn’t put us in disagreement, nor forcing him or me to choose sides.

Over the time, some of my colleagues asked me what I thought about some framework or language. I remember the discussion about TypeScript, that I had with one of them. My answer was simple : why should I learn a new language, when Javascript is enough for my needs? It’s not about anything else, other than needs.

Examples from History

You Need Your Own Language?

If you feel like you need your own language or you want to have some fun, you can create it using a language that you know well and PEG or ANTLR.

On the subject of “This has always bugged me and I can do better!”, I’ve spent some time playing with ANTLR4 and created a grammar for a language called Greuceanu (in the Romanian mythology, Greuceanu is a young brave man who finds that the Sun and the Moon have been stolen by entities called zmei. After a long fight with the three zmei and their wives (zmeoaice), Greuceanu sets the Sun and the Moon free so the people on Earth have light again).

Indeed, writing the grammar for a new language takes time, but there is help for that too : Visual Studio, Eclipse and Intellij

Interview Questions for Go Developer Position - Part II

Measuring And Classifying Go Developer Knowledge
Published on December 7, 2018
Go Developer Interview

About 3 minutes of reading.

Changing Perspective

Changing Perspective Might Help You Understand
Published on November 20, 2018
Go Channels Grouping Methods

About 7 minutes of reading.

Interview Questions for Go Developer Position

Measuring And Classifying Go Developer Knowledge
Published on November 18, 2018
Go Developer Interview

About 7 minutes of reading.

comments powered by Disqus