From nobody Mon Jan 22 22:45:43 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 4TJlgM6jdKz58MX0 for ; Mon, 22 Jan 2024 22:45:51 +0000 (UTC) (envelope-from robert@rrbrussell.com) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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 4TJlgM1FLvz4XBm for ; Mon, 22 Jan 2024 22:45:51 +0000 (UTC) (envelope-from robert@rrbrussell.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rrbrussell.com header.s=fm2 header.b=dbkveYRT; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="P zjhFqe"; dmarc=pass (policy=quarantine) header.from=rrbrussell.com; spf=pass (mx1.freebsd.org: domain of robert@rrbrussell.com designates 64.147.123.20 as permitted sender) smtp.mailfrom=robert@rrbrussell.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 863733200B07 for ; Mon, 22 Jan 2024 17:45:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 22 Jan 2024 17:45:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rrbrussell.com; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1705963547; x=1706049947; bh=pWlGfwufFZrDAaBKSfu7fKaudP+XoY5UBvz63N0j+Qk=; b= dbkveYRTHzyj240ZyDNeeTpfJmPOLwXJRdx4bFl9cZEvTyFASgSBGKPY7d0Y4m+L peNTpg6t5CmHL4gmOpHCzLzpu9RPIrP2ZTH4To/O1Ec3xYOtcBo3F7q8pRB6kkCz aDNeVqTvRTBOLdrIs90FgMKMkWwnHd5ArjrAvUoWjC7JKtXkUjiniNe5vAAOIeKA 8ajC4zsszHKFIGmVWgGcEf17KJXn6akuta9L+JTEGSfw03ll9tbk9CE1hVb4aZZ1 1l+u3c9BCMMGK38HPkFUcR6WLrY11bwkk9DZ8IdHqA1cmuOIAyqxi1NcLMvsAg0j Xfu0VT7RCRMSC88gZMuHFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705963547; x= 1706049947; bh=pWlGfwufFZrDAaBKSfu7fKaudP+XoY5UBvz63N0j+Qk=; b=P zjhFqeVm7RcS3ALbnFfU9Dd+FprUGMwA0HjEcIqd/1mYGczoKpo8C3f5ahDkg+RO GaZjoIZcukFn59ZPOQxxEH+bRkjwSdiCI8KZZd5aGNuDMrMHkMbkHBXGGTzskdcp PgUEO330f8L/I+1Y+0QzOSR0uBzP+uoMKvq6tYL+wpqmXuJvt6hlJkiAXu7HjMwZ b6mza+2fCOXoG/qapb1PqwqiBLmMHoD5VOKRkWtB7i4YRiT/7WOVb78ZAtkhMyI4 VJ1r4ZUFYJtW/jPBsSFCvB5J9zAO+8oYpS5ItD2q9yeHA64tZupngK/nKaJ9sUSZ lwRE1pyf+zzDd1SfTQxEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekjecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfgjfhfogggtgfesthejredtre dtvdenucfhrhhomhepfdftohgsvghrthcutfdrucftuhhsshgvlhhlfdcuoehrohgsvghr thesrhhrsghruhhsshgvlhhlrdgtohhmqeenucggtffrrghtthgvrhhnpeduhfejieekke ekieehgfeghefhjeegledvledvtdetgeevfeefvdeiffekvddtgfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgsvghrthesrhhrsghruh hsshgvlhhlrdgtohhm X-ME-Proxy: Feedback-ID: ie421460a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 22 Jan 2024 17:45:46 -0500 (EST) Date: Mon, 22 Jan 2024 16:45:43 -0600 From: "Robert R. Russell" To: freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in the base system) Message-ID: <20240122164543.066e3cec@venus.private.rrbrussell.com> In-Reply-To: <2f38cbcd-61a9-42b7-b7e6-ebd261fe66da@FreeBSD.org> References: <1673801705774097@mail.yandex.ru> <202401210751.40L7pWEF011188@critter.freebsd.dk> <20240121102421.GE14773@memo2.memo.frmug.org> <2f38cbcd-61a9-42b7-b7e6-ebd261fe66da@FreeBSD.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.50 / 15.00]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[rrbrussell.com,quarantine]; RWL_MAILSPIKE_EXCELLENT(-0.40)[64.147.123.20:from]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.20]; R_DKIM_ALLOW(-0.20)[rrbrussell.com:s=fm2,messagingengine.com:s=fm3]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.20:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[rrbrussell.com:+,messagingengine.com:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[robert]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+] X-Rspamd-Queue-Id: 4TJlgM1FLvz4XBm On Mon, 22 Jan 2024 19:17:30 +0100 Matthias Andree wrote: > Am 21.01.24 um 11:24 schrieb Bertrand Petit: > > > 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. > > I have read this thread up to what's here now, and I like that it > kept to a very useful constructive tone and arguments exchanged. > > So, personally, I've always found a language whose compiler gets > recompiled several times a week if I do ports development is > something I definitely can't advocate having in source. > > The same goes for the 3rd party stuff. > > Even if you mirror external dependencies to prevent from losing them > with some upstream maintainer's decision, and keep maintainable, that > begs the question: who is reviewing, polishing, maintaining this? We > certainly don't want Log4J-like disasters to strike because in all > convenience and "don't rewrite the world" programmer-time efficiency > claims we used all sorts of, whoever wrote this, "half the Internet". > > I understand that people who have spoken up in this thread have > inter-individually mixed feelings (meaning one person proposes it, > the next person is loathe of it) about C++, about the Standard > Template Library (STL) in particular, and I find it a pity that most > arguments in this thread around C++ did not mention a standard > edition's year. > > I have been around C++ since before it became an ISO standard, I have > seen it on the decline when C++03 seemed to have stalled, but I can > really sympathize with Microsoft's "Welcome back to C++" approach. > C++ has come a really long way, and over the past decade shown to > deliver continually. C++14 or C++17 is lightyears ahead over what > people left behind who haven't followed/used it in many years. > > So I really would have wished for people to not just write C++ but > really the minimum/oldest edition they would consider. > > I understand why people sometimes steer clear of Standard Template > Library - but I really liked how clear the dis-/advantages of its > datatypes and algorithms are laid out. Yes, you can still shoot > holes into your extremities when abusing the language, but Rust also > has unsafe modes... > > Rust advocates usually write about safety, but do we really want to > argue about introducing all this technical debt to just rule out ONE > PARTICULAR class of errors when there are dozens of others that open > up security risks? Seems a bit drastic to me. > > Do Rust proponents audit what all the indirect dependencies' codes do > before referencing them? Or are there bodies that tell us what > libraries are safe, when the base language can't dance? > > So bottom line, let's see to pushing Rust back and keeping it out of > the base system until it is stable, mature, and useful without > betting and risking our world on half of the outside Internet -- and > we really know it's not just another fad of the decade and have valid > use cases that really can't be shown in what we have in the base > system today. > Having had the luxury or curse of not being stuck with only one programming language I have learned usable pieces of several. C++ is not on that list even though I have the most formal education in it. My best way of answering why is this. Would you write or use a C++ codebase maintained by the average developer with just Vi? Up to C++03 I can say yes, after that the answer is no. A consequence of Microsoft's "Welcome back to C++" item that may have gotten missed is what resources are they spending to enforce compliance with a certain C++ standard? Particularly, to enforce the restrictions on anti-patterns? Cargo needs approximately a dozen lines in a configuration file to restrict its upstream sources. That includes whitespace and formatting.