Date: Mon, 9 Sep 2024 15:05:18 +0100 From: David Chisnall <theraven@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: ske-89@pkmab.se, freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in any system) Message-ID: <C992AC0F-6EA4-4B67-BC0C-702209039586@FreeBSD.org> In-Reply-To: <202409091332.489DWNmO084207@critter.freebsd.dk> References: <202409091304.aa20239@berenice.pkmab.se> <202409091124.489BOWk2082765@critter.freebsd.dk> <B8AEE93C-6431-4ED2-B1C6-7945A9A41AD0@FreeBSD.org> <202409091332.489DWNmO084207@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 9 Sep 2024, at 14:32, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: > > David Chisnall writes: > >> On 9 Sep 2024, at 12:24, Poul-Henning Kamp <phk@phk.freebsd.dk <mailto:phk@phk.freebsd.dk>> wrote: >>> >>>> What might that subset be? >>> >>> Initially it will be "better C compiler", but then we will gradually >>> allow more and more of C++ to be used. >> >> In my experience, the worst C++ code is written by people thinking in C. >> The second worst is written by people thinking in Java (or Smalltalk). > > I dont disagree :-) > > But it's either a gradual approach or "never" because a rewrite in toto wont happen. I agree, incremental change is always better. I just don’t want to encourage anyone to write C++ that looks like C, because that’s going to combine the frustrations people have with C and C++. A gradual approach needs a simple step 1, but it also needs a step 2, and then a step 3, and so on. David [-- Attachment #2 --] <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">On 9 Sep 2024, at 14:32, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:<br><div><blockquote type="cite"><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><span style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">David Chisnall writes:</span><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><blockquote type="cite" style="font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">On 9 Sep 2024, at 12:24, Poul-Henning Kamp <<a href="mailto:phk@phk.freebsd.dk">phk@phk.freebsd.dk</a>> wrote:<br><blockquote type="cite"><br><blockquote type="cite">What might that subset be?<br></blockquote><br>Initially it will be "better C compiler", but then we will gradually<br>allow more and more of C++ to be used.<br></blockquote><br>In my experience, the worst C++ code is written by people thinking in C.<span class="Apple-converted-space"> </span><br>The second worst is written by people thinking in Java (or Smalltalk).<br></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">I dont disagree :-)</span><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">But it's either a gradual approach or "never" because a rewrite in toto wont happen.</span><br style="caret-color: rgb(0, 0, 0); font-family: SourceCodePro-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div></blockquote></div><br><div>I agree, incremental change is always better. I just don’t want to encourage anyone to write C++ that looks like C, because that’s going to combine the frustrations people have with C and C++. A gradual approach needs a simple step 1, but it also needs a step 2, and then a step 3, and so on. </div><div><br></div><div>David</div><div><br></div></body></html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C992AC0F-6EA4-4B67-BC0C-702209039586>
