From nobody Sun Jan 21 10:24:21 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4THqMr25xxz5786Z for ; Sun, 21 Jan 2024 10:29:12 +0000 (UTC) (envelope-from freebsd-hackers@phoe.frmug.org) Received: from frmug.org (enterprise.frmug.org [213.36.253.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4THqMq75WFz4CWm for ; Sun, 21 Jan 2024 10:29:11 +0000 (UTC) (envelope-from freebsd-hackers@phoe.frmug.org) Authentication-Results: mx1.freebsd.org; none Received: by frmug.org (Postfix, from userid 66) id D57FA12B96A; Sun, 21 Jan 2024 11:29:03 +0100 (CET) Received: by memo2.memo.frmug.org (Postfix, from userid 1001) id 03E7317984; Sun, 21 Jan 2024 11:24:21 +0100 (CET) Date: Sun, 21 Jan 2024 11:24:21 +0100 From: Bertrand Petit To: Poul-Henning Kamp Cc: freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in the base system) Message-ID: <20240121102421.GE14773@memo2.memo.frmug.org> References: <1673801705774097@mail.yandex.ru> <202401210751.40L7pWEF011188@critter.freebsd.dk> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <202401210751.40L7pWEF011188@critter.freebsd.dk> User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 4THqMq75WFz4CWm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12322, ipnet:213.36.0.0/16, country:FR] On Sun, Jan 21, 2024 at 07:51:32AM +0000, Poul-Henning Kamp wrote: > > 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. That is probably quite tough a measure but I understand and like your point. I also would also love to read the kool kids explain why the blunt assertion that " can't be implemented unless written in rust" is true as this seems to be contrary to all I know about computer science. (They probably never heard of haskell.) That asside, as much as I would like to see erlang and zig in base (yes, I like type systems), I would never advocate for them to be considered. I find these languages as well as rust so different in their environments, runtime and ecosystems, that their integration would require a so heavy shoehorning that it would probably result in a value less than the sum of them all. One of the strong values of FreeBSD is its stability. For fun I recently booted a 4BSD-something on a VAX emulator and immediately felt at ease, because of this stability. I perceive rust, despite some of its technical merits, as unable to provide that kind of stability. This language is a fast and (still) unstable moving target, so fast that once integrated it will immediately be obsolete on release. The integrated version would probably only be usable to compile base, countless other packaged versions would be required to compile ports---I'm also thinking about llvm here. That is bound to be a maintenance nightmare, for the FreeBSD teams and for the users alike. After reading the pros and cons posted on the mailing list, merging them with my own experience, I think rust should be avoided at all costs from being integrated into base, no part of base should ever be written in rust. However, if rust needs something for a proper usage from ports such as kernel interfaces, linking facilities, etc., we should provide it from base. -- %!PS -- Bertrand Petit /D{def}def/E{exch}D/G{get}D/I{2 div}D/U{dup}D/L{roll}D/Y{setgray}D/N{newpath}D /O{N 0 0 moveto}D/P{pop}D/T{translate}D currentpagedevice/PageSize G U 0 G/w E D 1 G /h E D w I h I T 0 Y 1 setlinewidth 0 1 2 { P 120 rotate 2 4 w U mul h U mul add sqrt I 50 add {N 50 0 3 2 L 0 360 arc stroke}for}for/s{O true charpath pathbbox exch 4 -1 L E sub I 3 1 L sub I} D /l(bp)D 0.94 Y /Helvetica findfont 22 scalefont setfont l s P(x)s exch P T O l show showpage