Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2024 06:38:40 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Ihor Antonov <ihor@antonovs.family>, freebsd-hackers@freebsd.org
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <Za4NcPpy6--83vo3@FreeBSD.org>
In-Reply-To: <202401210751.40L7pWEF011188@critter.freebsd.dk>
References:  <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com> <1673801705774097@mail.yandex.ru> <CANCZdfpqWgvV_RCvVO_pvTrmajQFspW%2BQ9TM_Ok3JrXZAfeAfA@mail.gmail.com> <ef4ad207-5899-42b6-8728-bc46f1417e9e@antonovs.family> <202401210751.40L7pWEF011188@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 21, 2024 at 07:51:32AM +0000, Poul-Henning Kamp wrote:
> ...
> But after I read this entire thread, the "pro" argument for Rust
> seems boil down to just "all the cool kids do it".
> 
> That exact same argument was used for "Perl in base" and "Java in
> base" previously, and if we hadn't dodged those bullets, we wouldn't
> be here today.

+1.  And Perl even didn't need to bootstrap itself with itself or
specific version of LLVM which takes ages to build and/or ~200GB of
tmpfs space.  My computer at work has only 4GB of RAM and I still
want to build and run modern FreeBSD on it.

While I generally do not oppose the idea of (re)writing parts of the
system in better, safer language, anything which itself is not written
in C/C++ (or can bootstrap itself from scratch in minutes) should not
be taken seriously.

> I will also "second" the comment about C++ getting to be a really
> good language, in particular if you play it like a violin:
> 
> 	Just because you /paid/ for the entire bow, doesn't mean you
> 	have to /play/ the entire bow.
> 
> So rather than jump onto this or some other hypewagon-of-the-year,
> only to regret it some years later and having to repay the technical
> debt with interest to get it out of the tree again, I propose that
> we quietly and gradually look more and more to C++ for our "advanced
> needs".

Right.  FWIW, had evolved significantly over the last 20 years and
gained a lot in the safety department with proper ownership (move)
semantics, new reference/smart pointer types, lambdas, etc. to the
extent its author claims that it's no less safe than Rust now*.

> I also propose, that next time somebody advocates for importing
> some "all the cool kids are doing it language" or other, we refuse
> to even look at their proposal, until they have proven their skill
> in, and dedication to, the language, by faithfully reimplementing
> cvsup in it, and documented how and why it is a better language for
> that, than Modula-3 was.

As always, Poul-Henning just nails it.  Well said!

./danfe

*) https://developers.slashdot.org/story/23/01/21/0526236/rust-safety-is-not-superior-to-c-bjarne-stroustrup-says



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