3 ms·
In terms of what it's good at, Go is most similar to Java/C#. It's a pretty fast, fairly straightforward, strongly typed, roughly object-oriented, general-purpo
by twic 7y ago
In terms of what it's good at, Go is most similar to Java/C#. It's a pretty fast, fairly straightforward, strongly typed, roughly object-oriented, general-purpose programming language. It has some distinct implementation differences from Java/C# (AOT compilation, different implementation of polymorphism, etc), and it is further towards the straighforwardness end of the straighforwardness-expressiveness axis than they are, but it's comparable.
But in terms of the niche it occupies in the whole programming ecosystem, it's rather different. Its straighforwardness makes it easy to pick up, and as you note, it has become a popular choice for dynamic language programmers who either want a fast, typed language as a second language, or who want to move on from their current language altogether.
- pjmlp 7y agoJava and .NET support AOT since the early days, now that many don't learn them is another matter.
- twic 7y agoI don't know much about .NET, but that isn't true of Java in a substantial sense. Using AOT compilation would mean not using bytecode weaving and some other dynamic features, at which point you're not really using Java.
- pjmlp 7y agoBytecode weaving is not something supported officially by the language standard, just something that "happens to work, use at your own risk" kind of thing. There are even Aspect Oriented programming libraries for C++ that work at machine code level, just as info. Examples of Java AOT toolchains since around 2000: Aicas, Aonix, JET, PTC, Websphere Real-Time, gcj, Embedded JVM, Gemalto, J/Rockit. Not all of them have survived to this day due to multiple reasons, mostly business related, PTC has acquired Aonix, gcj was abandoned when OpenJDK was released, and JET has given up their business as of this year, for example. Likewise on .NET side, it was shipped with NGEN since version 1, Mono/Xamarin uses AOT for iDevices, Sony and Nintendo consoles, Unity AOT compiles via IL2CPP, Windows 8.x uses MDIL which produces AOT binaries on the Windows Store, Windows 10 has .NET Native, with CoreCLR and .NET going to get merged in .NET 5. Also Singularity and Midori only used AOT mode, making use of MSIL just like LLVM uses its bitcode. So yeah, just lack of information.