Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Sep 2024 09:44:16 +0200
From:      Kristof Provost <kp@FreeBSD.org>
To:        David Chisnall <theraven@freebsd.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, Alan Somers <asomers@freebsd.org>, Dmitry Salychev <dsl@freebsd.org>, Jan Knepper <jan@digitaldaemon.com>, freebsd-hackers@freebsd.org
Subject:   Re: The Case for Rust (in any system)
Message-ID:  <B355DB3E-82A2-407A-9D70-2A40C953DEB2@FreeBSD.org>
In-Reply-To: <4E4FB8CC-A974-42C4-95D5-2E1E4BF681AD@freebsd.org>
References:  <202409060725.4867P3ul040678@critter.freebsd.dk> <4E4FB8CC-A974-42C4-95D5-2E1E4BF681AD@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=_MailMate_E5759273-0E93-4EE1-AC01-902E3AC4744A_=
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 6 Sep 2024, at 9:41, David Chisnall wrote:
> The strategy document that I coauthored at Microsoft recommended the 
> following:
>
>  - C++ conforming to the Core Guidelines and with static analysis for 
> existing C/C++ projects with the C parts incrementally migrated to 
> C++.

While I’d be interested in seeing Rust demonstrated there are clearly 
still some practical issues to work out before we can, even in user 
space.

So, at the risk of derailing the Rust conversation, I want to ask about 
C++.

We already ship user space C++ code, what’s stopping us from doing so 
for kernel code?
If we can get some of the benefit of a more modern language with much 
less effort would that be a worthwhile step? RAII would not *always* 
make reasoning about locks easier, but it would in at least 95% of 
cases.

What would we need to do to be able to use C++ in the kernel?

Best regards,
Kristof
--=_MailMate_E5759273-0E93-4EE1-AC01-902E3AC4744A_=
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
</head>
<body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty=
le=3D"white-space: normal;">
<p dir=3D"auto">On 6 Sep 2024, at 9:41, David Chisnall wrote:</p>
</div><div class=3D"plaintext" style=3D"white-space: normal;"><blockquote=
 style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136=
BCE; color: #136BCE;"><p dir=3D"auto">The strategy document that I coauth=
ored at Microsoft recommended the following:</p>
<p dir=3D"auto"> - C++ conforming to the Core Guidelines and with static =
analysis for existing C/C++ projects with the C parts incrementally migra=
ted to C++.</p>
</blockquote></div>
<div class=3D"markdown" style=3D"white-space: normal;">
<p dir=3D"auto">While I=E2=80=99d be interested in seeing Rust demonstrat=
ed there are clearly still some practical issues to work out before we ca=
n, even in user space.</p>
<p dir=3D"auto">So, at the risk of derailing the Rust conversation, I wan=
t to ask about C++.</p>
<p dir=3D"auto">We already ship user space C++ code, what=E2=80=99s stopp=
ing us from doing so for kernel code?<br>
If we can get some of the benefit of a more modern language with much les=
s effort would that be a worthwhile step? RAII would not <em>always</em> =
make reasoning about locks easier, but it would in at least 95% of cases.=
</p>
<p dir=3D"auto">What would we need to do to be able to use C++ in the ker=
nel?</p>
<p dir=3D"auto">Best regards,<br>
Kristof</p>

</div>
</div>
</body>

</html>

--=_MailMate_E5759273-0E93-4EE1-AC01-902E3AC4744A_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B355DB3E-82A2-407A-9D70-2A40C953DEB2>