3 ms·
> they took an init system that was (mostly) written in a memory-safe language (bash) and rewrote it in a memory-unsafe language (C++) While Bash is memory saf
by AsyncAwait 7y ago
> they took an init system that was (mostly) written in a memory-safe language (bash) and rewrote it in a memory-unsafe language (C++)
While Bash is memory safe, it is also very error prone to write and the potential of shooting yourself in the foot with it is rather big, especially with bigger scripts and considering these are executed mostly with root privileges, bash is not an ideal choice either.
I'd prefer if systemd was a Rust project for sure, but they went with C, presumably to remain consistent with the kernel, GNOME and most lower-level Linux system software, (also, Rust was pre-1.0 at the time).