Hacker News new | ask | show | jobs
by kirbyfan64sos 1319 days ago
Rust came out in 2015, a year after the first release of Flatpak (back when it was still called xdg-app) in 2014. The ecosystem was also much smaller; some very necessary things for working nicely on Linux that exist now like zbus (the prominent async-compatible D-Bus library) wouldn't be a thing for several more years.

RH does have an interest in Rust, used in projects such as Stratis. It's just that the Linux dev ecosystem has been very C-reliant for a long time, and a massive amount of binding and other ecosystem work is still happening to make this possible.

*EDIT:* and the reason I mention Rust specifically is that, in these types of lower-level projects, a lot of things can start to get hairy very quickly in higher level languages. Things like some namespace APIs very much wanting to be run on a single thread, or trying to maintain performance when you're intercepting and examining every D-Bus message, or even just when you want your functionality to be in a reusable core library.

1 comments

Safer systems languages than C predate C.
But the Unix environment is written in C, and there's a ton of legacy from the past several decades still to migrate from C. It's going to be slow going. That said, ditching sudo seems like the right thing to do, but then, writing a drop-in replacement is non-trivial too because sudo/sudoers is so baroque -- yet w/o a non-drop-in replacement would require user/customer migrations.

Meanwhile RedHat and others don't have infinite resources, and they inherited sudo.

Yes, because UNIX authors decided it was more fun to create C and ignore the history of safer systems programming.

They were also open about it, and thus created lint for validating the code, which most people ignore when writing C code.

Sure, there is a mountain of legacy code. But why start Flatpak in C?
Because C can run on almost everything? For example, take Doom and the whole "Can it run Doom?" meme
Except for some weird architectures, where C is supported, C++ is as well.

And if either GCC or clang are supported, they support safer languages than C and C++ on their standard collection of frontends.

How many architectures run Flatpak that don't have a compiler for any safer systems language? I don't think you run Flatpak on weird embedded chips, but maybe I'm mistaken.