Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Sep 2024 08:25:13 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        David Chisnall <theraven@freebsd.org>
Cc:        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:  <202409060825.4868PDWO042319@critter.freebsd.dk>
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
--------
David Chisnall writes:
> On 6 Sep 2024, at 08:25, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
> >
> > I will also note that almost all the blame for C's current status
> > lies with the standardization efforts, which almost seem hell-bent
> > on destroying the language rather than improving it.
>
> As someone who is involved with C++ standardisation and so periodically =
hears
> things from WG14, my impression is that the people who care about the th=
ings
> that you list have all moved to C++, [=E2=80=A6]

I've heard that from other sources too, strangely also from somebody
quite active in the C standardization process, but no sane (to my
mind) rationale was provided for this state of things.

The C-stewardship situation has become increasingly intolerable to
me, and I have practically already made up my mind, that Varnish
Cache will migrate to a defined subset of C++, roughly corresponding
to where I think C should have been by now.

In one experiment, I wrapped the C-code in:

	#ifdef __cplusplus
	extern "C" {
	#endif

and compiled it with a C++ compiler.

Given that we have tried to dial code quality to 11 in Varnish, the
number of relevant observations by the C++ compiler was a devastating
indictment of how badly the C language has been let down by it's
stewards.

I'm not saying FreeBSD should think along the same lines, but FreeBSD
should totally think along those same lines:

Even if we stick with pure C-code, the C++ std-people have a much
more sane approach to it's proper compilation that the C std-people.

And there are nice features in C++ which do not make the source code
unreadable.

Poul-Henning

-- =

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    =

Never attribute to malice what can adequately be explained by incompetence=
.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409060825.4868PDWO042319>