I’m all about writing code once. But compiling a few times doesn’t seem like that big of a deal to me?
The article says it runs on “six operating systems” but I can’t find them listed?
I’m all about writing code once. But compiling a few times doesn’t seem like that big of a deal to me?
The article says it runs on “six operating systems” but I can’t find them listed?
And it has not been the case for close to a decade now.
The reason I value it is because it makes deployment so much easier. I've re-lived DLL Hell so many times on so many systems by now that I'll happily take the memory/filesystem/pactching pain to have something I can deploy and know it will run on the system I deploy it to any day of the week.
Which is how most in the community act like.
There is also a lesson on why dynamic linking is used, and why in its absence one needs to resort to IPC.
Basically every Go executable is dynamically linked against libc these days unless the builder goes seriously out of their way to get a static binary.
$ go version
go version go1.18.3 linux/amd64
$ cat static.go
package main
import "fmt"
func main() {
fmt.Println("static")
}
$ go build static.go
$ file static
static: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=TSoFKMWZzy5G6qyFvxx5/dwEbvdQns9f-iffR-lbW/iTmqy3UF8tbT-GGwVH61/lUZUt7_XebTifpVvE_52, not stripped
$ ldd static
not a dynamic executable
But it might not be the case for all systems. And some things, like using CGO or performing DNS lookups, will necessitate dynamic linking.> This post describes a proof-of-concept Python executable (2.7.18 and 3.6.14) built on Cosmopolitan Libc, which allows it to run on six different operating systems (Linux, Mac, Windows, NetBSD, FreeBSD, OpenBSD)
It would have been nice if the OP had spent a few words on the motivation here.
So some subset of those