Re: The Case for Rust (in any system)

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Mon, 09 Sep 2024 20:26:34 UTC
--------
fvalasiad writes:

> Codebases out there using C++ as if its C with classes, completely out of
> the loop regarding modern technologies. And I am talking about userland here.

There are two cases here.

But here we are talking about bringing an existing mature C codebase
into the Century of the Fruitbat, without doing a total rewrite in
one go.

The first step is to get (relevant parts of) the code into a C++ compiler.

Steps two to N are:

Reap tangible benefits by employing features of C++ language as that
becomes possible and sensible (ie: as the C++ specific runtime
environment becomes available).

"C with classes" is a very sensible step along that (long) journey IMO.

But if we were talking a new green-field project that would be utterly silly.

Poul-Henning


PS: C++ was called "C with classes" first time I heard about it in 1985 :-)

-- 
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.