That said I agree they should have picked Go instead /s.
That said I agree they should have picked Go instead /s.
I don't really have an opinion on what language should have been picked instead, though OCaml may be a good candidate.
EDIT: or maybe as PID 2, per https://github.com/omisego/ewallet/issues/108 , though I'd be interested in the idea of writing an OTP application that can reap zombies and forward signals.
Isn't that basically what SysVinit and a good-sized chunk of the management tooling in Linux is?
To their credit, Bash is a _weird_ language, but it's not going to corrupt memory when it crashes, and its failure modes are pretty well understood by the distro maintainers writing those scripts.
https://en.wikipedia.org/wiki/Systemd#History
> Go was publicly announced in November 2009,[29] and version 1.0 was released in March 2012.
https://en.wikipedia.org/wiki/Go_(programming_language)#Hist...
The brand-new language that Google just announced last year was probably not considered a serious option here.
They could have even take inspiration, imagine: typed, functional, monadic init files - "systemd: avoid success at all costs" :)
Lua would have been a good candidate: memory safe, coroutine to structure the code in a concurrent-ish way if needed, and you have a configuration file parser for free (just use Lua as the configuration language, it was its very first purpose after all).
I wouldn't expect CPU-bound multithreading to be much of a concern in an init/rc system. And resource thriftiness and predictability would likely be a bigger concern.
OCaml concurrency is great, and Lwt [1] would be exactly what systemd need: run daemon and poll the answer concurrently.
Ada, C++ and D would have been another great choices.
From system programming solely: libguestfs, Xen API, liquidsoap, Unison, MirageOS, google drive on fuse, 0install.
Rust might be better now; my primary concern would be community size and whether I was limiting my contributor base, which Go also has as a concern. In both cases though I'd take it over C/C++ being used on such a critical project at this juncture.
In 2010, though... yeah, choices are a lot worse.
I'm not against go, other than gc and some size considerations. Given that a lot of k8s infrastructure for the likes of CoreOS and similar are written in it, it's definitely not a bad option. I think that today, and more so in late summer as async/await syntax settles, that Rust should be a first consideration for any low-level system code.
https://en.wikipedia.org/wiki/Systemd#History
> Mozilla began sponsoring the project in 2009[16] and a nnounced it in 2010.
> The first numbered pre-alpha release of the Rust compiler occurred in January 2012.
https://en.wikipedia.org/wiki/Rust_(programming_language)#Hi...
Look, I like Rust and all, but are we really suggesting it for projects that predate public release of rustc?
Many init systems have been created in bash, and I'd hardly call that a low level language.
And that reason is that one rarely needs to write a million lines of Bash: http://catb.org/esr/writings/unix-koans/ten-thousand.html
You underestimate my masochism and/or overestimate my sense of restraint ;)