Remix.run Logo
PaulDavisThe1st 2 hours ago

Tiring how often this needs to be said, but if you want "C with classes", you can just use C++ that way.

I've been using C++ for more than 30 years (I added thread_local to Cfront back in the early 90s), and while the language has grown dramatically in that time, there is fundamentally nothing that would prevent me from writing "C with classes" using the modern version.

I don't do that because I also like RAII, and polymorphism, and operator overloading and ...

I've never used .NET and could not imagine any scenario under which I would. The libraries that matter to me are mostly written in C or C++ and there are more of them than I'd ever need, mostly.

zabzonk 28 minutes ago | parent | next [-]

> nothing that would prevent me from writing "C with classes" using the modern version.

Or indeed "C without classes", just with some extra type-checking.

And of course K&R used Stroustrup's C++ compiler to build and test the code for TCPL 2nd Ed.

QuadmasterXLII an hour ago | parent | prev [-]

Languages are both read and written, restrictions like OP is pining for are fundamentally for reading. As such, it is not terribly helpful that they can opt in to restrictions when writing.