Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2024 11:31:39 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        fvalasiad <fvalasiad@proton.me>
Cc:        "lain." <lain@fair.moe>, freebsd-hackers@freebsd.org
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <202409031131.483BVdax004602@critter.freebsd.dk>
In-Reply-To: <dHVxEgS5MbvPceHSJF-G42LSk22NXsjKKwPzFagCTDNsKO4zgQpZKjteuGEAdO2ikPVIkP-3x6r2I1caTlM2YQrH3vjrWzgtRUVFtwsObOA=@proton.me>
References:  <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com> <vdmg5zocd6wqcwc2bvzvzqn4bii2pwdc2r4mgnisukfkboj6nf@f7lv5quu4fjx> <CAOtMX2iDK3uN_oQgzzZAdoOZCfNsnvpefeZvKoTCRmPBhZywzA@mail.gmail.com> <CANCZdfqB1%2B-8BkpKwKoCM%2BzM4mCOFy63yHr1Pco7MnT1DFkb4w@mail.gmail.com> <knnsh327gxyvaajwrymvflnivf3tsnigyqw2d6etfhb4irft3x@ydkh3zmb6uch> <CANCZdfoHjYUDeNo78qk6BjHfRgwgDbuuVjD5D9uG6tyCk81-ew@mail.gmail.com> <Zq69w1D7aYRiNdPx@kib.kiev.ua> <CAFYkXjmURZwBbrFL=uWT%2BDZ6h_qjjpoucxW4-3CpDhKn3XX2gg@mail.gmail.com> <jbuwu5qby7gb7abym3msutmojx26qhwcgyyb2cb6nfnf2w4a6h@otor5sawmss5> <dHVxEgS5MbvPceHSJF-G42LSk22NXsjKKwPzFagCTDNsKO4zgQpZKjteuGEAdO2ikPVIkP-3x6r2I1caTlM2YQrH3vjrWzgtRUVFtwsObOA=@proton.me>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
fvalasiad writes:

> This is rather pessimistic though, just because a kernel was initially w=
ritten
> 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 =E2=80=A6 ehh =E2=80=A6 am=
bitious?
=E2=80=A6 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=
.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409031131.483BVdax004602>