4 ms·
One major difference that makes Golang lower level is that it compiles to machine code for the target CPU arch/OS instead of bytecode.
by MobiusHorizons 5y ago
One major difference that makes Golang lower level is that it compiles to machine code for the target CPU arch/OS instead of bytecode.
- jcelerier 5y agoC# also supports AOT compilation. It's definitely not a low-level / high-level language differentiator. The term generally means the abstraction level you can reach.. I'd be tempted to define it as the distance to simple lambda-calculus in the lambda-cube
- alexklark 5y agoOh, AOT compilation, great memories. How many year of CPU work and downtime it took from exchange servers, when you wait every update to “compile” for hours, just because it is awesome. Or when you getting laptop heating and you know - it is dotnet compiles and optimising something for you, another great update. Yes, C# also supports ahead of time compatibility - it is portable for whole 20 years between windows computers. How cool is that? Another advantage is speed - calculator or photo viewer only takes 1-3 seconds to open on 5 ghz 8 core cpu. Yet another advantage is size - only 3-5 gigabytes of different version libraries in your system and you are golden for a month (next you need to install preview updates, and then just updates and thats all you good, secure and protected by Windows Defender). In all these aspects C# is clearly superior language.
- socialdemocrat 5y agoC# ahead-of-time compilation has for many years come with all sorts of caveats. Early versions requires runtime system because not everything got compiled on parts. Later versions have all sorts restrictions which do no apply for Go. I think when C# and Java people compare with other languages they treat it as a checkbox exercise without caring about how good that feature actually is.
- staticassertion 5y agoOK but Go carries around a runtime too?
- twic 5y agoI think this is a red herring - compiling to native code is orthogonal to low-levelness. Haskell compiles to native code, but is exceedingly high-level. Forth is traditionally bytecoded, or threaded-coded, but is excruciatingly low-level. Java was originally bytecoded, but at some point gained various ahead-of-time native compilers. Did it become lower level when that happened? It did not.
- kaba0 5y agoBy bundling a runtime. The abstraction level is pretty much the same as Java/C#/JS.
- staticassertion 5y agoI don't really see how that's relevant to the issue of pointer types.