Re: The Case for Rust (in the base system)
- Reply: Rob Norris : "Re: The Case for Rust (in the base system)"
- In reply to: fvalasiad : "Re: The Case for Rust (in the base system)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Sep 2024 11:31:39 UTC
-------- fvalasiad writes: > This is rather pessimistic though, just because a kernel was initially written > in C, means that it won't ever have a chance at another language? History is very close to a total confirmation on that hypothesis, but that may not be predictive of the future. All the kernels I know about, which have changed programming language, have amounted to total rewrites, partly because humans were faster at reinterpreting than converting the old source to the new, but mostly because the languages had different and non-compatible calling conventions. DARPAs "Convert C to Rust" call for research is … ehh … ambitious? … but it may actually make that part of the process less critical. You would of course still end up with a Rust kernel using C ABI, but I can imagine much worse. But first and foremost: There has to be a good enough reason. A very large part of that is convincing people they're not about to detour into a cul-de-sac from which it will very hard to get out[1] When you have been around the blocks for a few decades, you will have noticed that "The New Solution to Everything" is like chicadas: Every 7 or 8 years there is a LOT of noise and it generates a LOT of garbage before it is over. But every so often, one of them succeeds and stick around and it is seldom the obvious one[2]. SqLite vs MySQL - Who ordered that? Outside its "cult" I dont think a majority is yet convinced that Rust is going to be around ten or twenty years from now, whereas I doubt anybody seriously expect we'll get rid of C that fast. The best way to make Rust stick around, is to build a better mousetrap and make a lot of people use it, rather than try to convert people. But personally I wouldn't be at all surprised if ten years from now, Rust will be firefox's MUMPS. Poul-Henning [1] It says a lot about our civilization that there is now an internationally recognized road-sign for "If you are following your GPS: STOP and TURN AROUND", because there is a small Welsh village you can get an 18-wheeler into. [2] Many who knew, will have forgotten, and most are too young to know, but back in the 1980'ies all the smart money were on PROLOG and MODULA-3 as the Object Oriented Languages To Solve All Our Problems. C++, initially called "C with classes", were ridiculed as a futile attempt to keep C relevant in The Century of the Fruitbat. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.