Re: The Case for Rust (in any system)
- Reply: Jan Knepper : "Re: The Case for Rust (in any system)"
- In reply to: David Chisnall : "Re: The Case for Rust (in any system)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Sep 2024 08:25:13 UTC
--------
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 things
> that you list have all moved to C++, […]
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.