Erik Engheim
1 min readJun 24, 2021

--

Go does not have a virtual machine at all. Go has a runtime which handles garbage collection and goroutines.

Go compiles to native machine code, and was designed with this in mind. C# and Java was designed to run on virtual machines. Yes people have made ahead-of-time (AOT) compiler solutions for these langauges, but this is always tricky for something that was not designed for it.

With AOT you loose a of the ability to do reflection or load third party libraries at runtime.

You can have caching of machine code for the JIT compiler, but you will still need the JIT compiler at runtime as not everything will be in machine code.

Java and C# was designed for virtual machines specifically to be easily deployable. That very idea is obsolete because containers have taken over for language based virtual machines.

It does not mean it is obsolete in every sense. A virtual machine at the language level like JVM and CLR can help mixing different langauges. But in terms of deployment it offers no advantages anymore.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

No responses yet