News for hackers. Stuff that matters.
Re:C is the desert island language by AstralStorm on Tuesday October 02, 2018 @01:55PM (#18124036)
I've had just a cursory read through the C++ vs C version. Constructors can never fail? Nope, exceptions. If you think constructors should never fail, I think you haven't used malloc.

Templates are complex? Compared to preprocessor they're child's play. They're meant to replace most uses of preprocessor. Other compile time code like constexpr is not mentioned.

Exceptions are not mentioned yet are actually the most complex C++ machinery.

Scope changes are not mentioned but are critical to RAII and other useful anti-bug features.

That you can actually enforce compile time type safety is not mentioned either.

Lambasting the extra visibility keywords when C already has the nastiness of static, extern and inline is very peculiar. They are also essentially type safety measures.

C++ standard library which is strictly superior to C is not mentioned either.

C++ may not be perfect but at least it is being improved. C is the unchanged ancient form where the main gain is that it does not have stack frame unwinding and has trivial ABI.

Re:C is the desert island language by RcouF1uZ4gsC on Tuesday October 02, 2018 @06:29PM (#18126253)
Just another point of reference. The compiler the author uses to compile C, gcc, is actually now written in C++.
Re:C is the desert island language by x0re4x on Tuesday October 02, 2018 @09:27PM (#18127014)
No, GCC is still written mostly in C. Try:

git clone --depth=1 https://github.com/gcc-mirror/gcc.git

cloc gcc/gcc

Re:C is the desert island language by comex on Tuesday October 02, 2018 @09:48PM (#18127083)
The files have the .c extension, but they're actually C++.

…Yes, really. They didn't change the filenames during the migration.