3 ms·
As a long time C programmer I love seeing these sorts of 'better C' languages. I absolutely abhor modern C++ syntax, but there's one thing I think they deserve
by 01100011 5y ago
As a long time C programmer I love seeing these sorts of 'better C' languages.
I absolutely abhor modern C++ syntax, but there's one thing I think they deserve credit for. The C++ community is thinking deeply about first principles, consistency, composability, memory models and forward progress guarantees. I hope anyone looking to improve C learns from the longsuffering of the C++ world while avoiding many of their syntactical mistakes and evolutionary half-steps.
I really hope the C++ standards committee has a well funded legal purse. In 20 years when the lawsuits start coming from all the ex-programmers battling brain tumors they're going to need it.</s>
- pjmlp 5y agoI think money from Sony, Nintendo, AMD, NVidia, Microsoft, Apple, Google, Microsoft, IBM, Intel, Codeplay, Facebook should be enough for those lawsuits. :)
- jstimpfle 5y agoIMO, what C++ brings to the table is mainly everything that follows as a consequence from RAII. And RAII, that's just some syntax to make writing badly structured programs practical. Because it does the tedious parts of matching "parentheses", it allows you to use a lot of them, without consideration if you could refactor the program to get away with fewer of them. RAII also comes at the cost of requiring or encouraging "features" like exceptions and all the good stuff like copy/move constructors and what not. All highly non-orthogonal language features that require lots and lots of special cases and extra boilerplate.
- amelius 5y agoC++ already improved C. For example, you can now declare variables in the middle of a code block. Or write "for(int i = 0;" These things were not possible in old versions of C.
- flohofwoe 5y agoUnfortunately the few improvements are overshadowed by many more deprovements, the most critical being that the C subset in C++ has been forked into its own incompatible C dialect which is no longer compatible with C99 and beyond.