3 ms·
Why do we need to try to streamline C++ here? What's behind the urge to "cut out the fat"? Would doing this make C++ an even better performing language? What's
by CriticalCathed 7y ago
Why do we need to try to streamline C++ here? What's behind the urge to "cut out the fat"? Would doing this make C++ an even better performing language? What's the upside of gutting the language?
I don't understand the impulse here. Yes, the semantics of C++ are more elegant than the syntax. But that doesn't mean that the syntax is actually cumbersome.
- favorited 7y agoHaving so much syntax makes the language more difficult to learn, and you have to know the edge cases of each. It's universally recognized that, since C++11, you should use the `nullptr` keyword to create a null pointer. `nullptr` solves problems like not being implicitly convertible to integers, so you don't get the wrong overloads or template specializations. However, it's still perfectly valid to initialize a pointer to the NULL macro, etc. There's no benefit, but it's still all throughout codebases, so people will keep using it. Wouldn't it be nice if there was just one way to initialize a null pointer in new code?