Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have grave difficulties believing this, precisely because in the name of backward compatibility they haven't removed any of the nonsense that made C++ so difficult to wrap one's brain around. Instead, they added even more.

None of the corner cases that make C++ so hard to parse have actually been removed, so tools are still hard to write and unreliable. Nothing has been done to allow a user to express where pointer aliasing can occur and, more importantly, where it cannot, so many forms of important numeric optimizations are still extremely difficult. There are still at least three languages possibly intermingled at any given time--macros, template computation (a la Boost), and regular C++, each with its own style of assertion now. Rather than relaxing a restriction on type ordering they invented a whole new function syntax. Managing the variable closure around upward funargs (returning a lambda) is the programmer's responsibility, with a subtle stack smash if you get it wrong, or if anything you call with a lambda stores it somewhere behind your back. Two types of characters aren't enough; now char, char16_t, char32_t, and wchar_t all coexist. You can now create a const char string two ways, one of which is UTF-8 encoded and one of which is encoded any damned way the compiler writer pleases. The raw string syntax, another invention, further complicates the lexer. Objects now silently need a move constructor in certain circumstances to avoid silent, behind the scenes copies. You can't even reliably say "x = y;" any more; operator = can be deleted from whatever type x is. Rather than put the onus on the (admittedly horribly overworked, due to the previous crap) compiler writers to constant fold, now we have constexpr, just like const except different!

This is not a programming language. This is a train wreck. Supposedly this language is "close to the metal" but even the simplest operations can perform unbounded amounts of work behind your back (for example, due to implicit conversions, or operator overloading). This language is consumed with a focus on the irrelevant.

The Reg article, while very snarky, is not an unreasonable position to be taking here.




That's a bit depressing, but, hey, look on the bright side: now we may get strong AI out of people trying to generate and parse C++.

Though my bet is still on spam and anti-spam, they have better incentives.


Every couple of years the part of my brain responsible for making good decisions shuts off and I start looking at what all is required to parse C++, and in particular how you parse it in, say, yacc. As far as I can tell it is done by magic.

With the operator suffix extensions, though, I think C++ has broken new ground again. It is now the only allegedly serious language that requires a symbol table to lex.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: