From nobody Sun Jan 21 23:14:03 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 4TJ8LV069pz57xXn for ; Sun, 21 Jan 2024 23:14:10 +0000 (UTC) (envelope-from robert@rrbrussell.com) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 4TJ8LS6zl0z4Sfy for ; Sun, 21 Jan 2024 23:14:08 +0000 (UTC) (envelope-from robert@rrbrussell.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rrbrussell.com header.s=fm2 header.b=rMQsN2iT; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="N a17RoH"; dmarc=pass (policy=quarantine) header.from=rrbrussell.com; spf=pass (mx1.freebsd.org: domain of robert@rrbrussell.com designates 64.147.123.21 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 8FB503200A95 for ; Sun, 21 Jan 2024 18:14:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sun, 21 Jan 2024 18:14:07 -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=1705878847; x=1705965247; bh=jDP9UC+PvsY3Ng0iPQiUwurkFmFt96/SOx8M1LXFuTw=; b= rMQsN2iT+DFpjFHPvKsTZ5oWTPMW9YLrpKdZGDtKk9G3DcfnRX9X5KufLPXgvAFe 0NK8D5Zv0CSSxY6ZntCNc9dKYoh9qxavkf/eKs1VtDNZN3OFpB/Nc5PCcRkGnqc6 nOaWNzNrHVlToAx0H/9n88vhPq2fABAUjGgeK1YKS91Z+ICv/3ccCvN7ICNxKKFa Vfa6oH0Xb2hiscmopCZEQ5NhBfmexbeYARQGOY1mP+4eeZoIGgBuekLriVZEdUrn S10fLi1fWzQy82IhdZNTjsEHc7TOCKYrJN2saMSjYf7iPb7UFn+3t9YMYTdoGXUT uhKb9KWQJSzT3aNOb/jFFg== 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=1705878847; x= 1705965247; bh=jDP9UC+PvsY3Ng0iPQiUwurkFmFt96/SOx8M1LXFuTw=; b=N a17RoHoGy8/P9AA4cGRGYUD8UFH9pFX5DpjZDR46P/uybYerI2OgBloHyXSNvtD/ SbKczEgafE6cHeowHZEDPQg7xL27IsPDxwL5+QKkK1PFSfce5P8Nc9skZg/pbMws pwYZiFFr7whurFB5bIpHJA0W+uzm9uCM+noG9eyqPFUBaIXVDTnHvqovXVfK5Er1 /TgTZ05OL7yZv/23z/+9/E61pqO01la4oXHXDr2qBu54ai3vD0UAT0qmC/wEQK/t Eei6NWEKwyon8ZAaUDk956mksATEknZsY772Hl/woB7uv74W3K3nqmPzXLSSFK+p zzCfAZVDytF71lOqnV6Nw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekhedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtje ertdertddvnecuhfhrohhmpedftfhosggvrhhtucftrdcutfhushhsvghllhdfuceorhho sggvrhhtsehrrhgsrhhushhsvghllhdrtghomheqnecuggftrfgrthhtvghrnhepudfhje eikeekkeeihefggeehhfejgeelvdelvddtteegveeffedvieffkedvtdfgnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhosggvrhhtsehrrh gsrhhushhsvghllhdrtghomh X-ME-Proxy: Feedback-ID: ie421460a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 21 Jan 2024 18:14:06 -0500 (EST) Date: Sun, 21 Jan 2024 17:14:03 -0600 From: "Robert R. Russell" To: freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in the base system) Message-ID: <20240121171403.6f167408@venus.private.rrbrussell.com> In-Reply-To: <202401210751.40L7pWEF011188@critter.freebsd.dk> References: <1673801705774097@mail.yandex.ru> <202401210751.40L7pWEF011188@critter.freebsd.dk> 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 [-4.10 / 15.00]; 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]; R_DKIM_ALLOW(-0.20)[rrbrussell.com:s=fm2,messagingengine.com:s=fm3]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.21:from]; FREEFALL_USER(0.00)[robert]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[rrbrussell.com:+,messagingengine.com:+] X-Rspamd-Queue-Id: 4TJ8LS6zl0z4Sfy On Sun, 21 Jan 2024 07:51:32 +0000 "Poul-Henning Kamp" wrote: > -------- > Ihor Antonov writes: > > > As much as I love the idea of Rust, I don't think it is going to > > solve our problems. > > The tools are /never/ the real problem. > > I will readily agree that the ISO-C people have done more to hurt > the C language, and less to improve it, than anybody else, and that > we need to deal with their continued refusal to come into the > 1990'ies. I would love for you to expound on this point further. > 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. > > The sprawling and loosely connected ports collection has several > strata of "all the cool kids do it" languages, and it seems to be > a much better "organism" for dealing with their eventual obsolescence, > than our tightly integrated src collection. > > 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. Unfortunately, most Rust programmers treat cargo and crates.io the same way most C++ programmers treat the Standard Template Library and Object Oriented Programming. As much, as many, and as often as possible. > 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". I don't have your programming experience in and familiarity with C++ so I am looking at this from a different angle. I am worried we might end up with more technical debt faster if we use C++ than if we try something else. In my experience with Linux, now FreeBSD, and college I have seen more C++ and Java projects eat their original programmers out of the project and die than any other two languages singularly or combined. Even the "unmaintainable" C projects I have tried to resurrect got further than any attempt at resurrecting less decayed Java or C++ projects. I don't know exactly why but I have my suspicions. Based on those suspicions I am very leery of migrating code to C++. Rustc and/or Cargo will not be fun to integrate into the build system for base. I think that integration and the Rust code it supports will be easier to maintain or replace than any C++ code. I can mechanically substitute another repo for crates.io which will block Cargo from pulling in anything we don't curate. I don't know of a way to enforce a subset of C++. > 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. > > Poul-Henning > How do you define all the cool kids are doing it language versus I am assuming a serious language? I am not being sarcastic. For example I would personally call JavaScript unsuitable for operating system components but there is a huge amount of it out there. Darcs is written in Haskell but I don't think Haskell is good for operating system components.