4 ms·
There are some questionable statements like "Since the code gets directly combined to machine code, therefore, the binaries become portable." Compiling to machi
by snowAbstraction 9y ago
There are some questionable statements like "Since the code gets directly combined to machine code, therefore, the binaries become portable." Compiling to machine code like C does not lead to portability.
I thought Go programs can run on different machines supporting the same machine code because many (most, I don't know) Go programs are statically linked.
- deadsy 9y agoRight - they statically link which means that you typically don't have to worry about shared object dependencies when moving the binary around. You just have big binaries. If you use cgo (integration with C-code and C based libraries) then you are back to *.so versioning problems.
- DrScump 9y agoYou still have to worry about other factors such as byte-swapped platforms (big- vs. little-endian).
- kanishkdudeja 9y agoRight. I've mentioned this in the article now.
- kanishkdudeja 9y agoAuthor here. Apologies for the confusing "portability" section in the article. I've fixed it :)