DEV Community

Discussion on: what's the advantage of golang instead of java or C# ?

Collapse
 
rhyek profile image
Carlos González

Not sure about Java, but dotnet apps can be self-contained (they include the runtime) and you can now do trimming to lower the resulting file size somewhat. Nevertheless, this is usually not a concern since having a runtime ready to run your compiled application is pretty much a ubiquitous practice empowered by docker.

Collapse
 
jcbritobr profile image
Júlio César de Brito Gardona • Edited

Its a different thing. Golang compile directly to machine code. Self contained executables in dotnet uses the clr embedded to final deploy. Go solution is very small and statically compiled.

Thread Thread
 
coen_c7a57bc84f2f2 profile image
Coen de Wit

Dotnet can be compiled to machinecode for most platforms too. But the self-contained, compiled AOT and trimmed file is still quite a bit larger than a Golang package.