3 ms·
Static compilation is great but all of those languages require you to jump through hoops or have significant caveats to statically compile programs. Go is the g
by throwaway894345 5y ago
Static compilation is great but all of those languages require you to jump through hoops or have significant caveats to statically compile programs. Go is the gold standard for static compilation, and it’s pretty great to be able to deploy a single file!
- jpgvm 5y agoJava and C# are generally capable of this. It's a bit more native in Java than C# though. .NET has a rather awesome thing called the global assembly cache that makes static compilation somewhat of an anti-pattern. For Java you can easily create a "fat jar" by dropping a plugin into your build system, usually with zero or minimal configuration. (shadow is the popular one for Gradle). I am generally not a fan of Go (for a long list of reasons) but it's compilation speed and static by default (if you disable CGO, which you should) is definitely one of it's strong points.