3 ms·
I’m really glad that I’m at the stage where my decision to use a language is not influenced by HN articles or especially comments. Understanding the design dec
by klodolph 7y ago
I’m really glad that I’m at the stage where my decision to use a language is not influenced by HN articles or especially comments.
Understanding the design decisions for languages, especially languages like C++, JavaScript, and (less so) Java, is a problem for historians and not really suited for a technical explanation. For Go this is less true, but for the sole reason that Go is less than half as old as any of the other languages I listed!
For this reason, I find the comparisons between languages of different “generations” to be pretty uninteresting. C++ is a mess, but the reasons why it is a mess are interwoven with the historical context of C++’s creation. JavaScript likewise.
The main reason why we talk about Go’s selling points relative to e.g. JavaScript or C++ is because Go is popular enough and supported well enough that you can defend writing your corporate project in Go, and has enough libraries that you’re not going to be in trouble the moment you need to something simple like call into cloud services or open an image file. But at the same point, a comparison to JavaScript is really boring because JavaScript is so heavily constrained by 25 years of historical baggage, and Go is not.
So I see there being two bases for comparing languages that make sense.
1. You are solving an engineering problem, and need to pick a language to solve it in. You need to evaluate the language itself, available expertise, community, tooling support, interop, libraries, etc. Your choice needs to be defensible in some way so that you don’t get fired for picking that language. For most environments, Go passes the bar and is defensible as a choice, but the elegance is not really that salient.
2. You are solving a programming problem, and want to pick a different language to solve it in to stretch your experience or see what other languages are like. For this, you might look at detailed comparisons between languages like Pony, Nim, and Zig. Elegance or other personal criteria are of prime importance here.
I don’t see a use case for comparing the elegance of Go, C++, and JavaScript.