4 ms·
Every language has quirks and issues - if you use raw char arrays like that in general purpose C++ without an extremely good reason that's not just forgetting a
by inglor 12y ago
Every language has quirks and issues - if you use raw char arrays like that in general purpose C++ without an extremely good reason that's not just forgetting and trivia that's a cultural issue.
Just like you wouldn't see Python code relying on mutable default values or JavaScript value relying on `with` semantics or Java code relying on `URL` comparison through DNS very often - you shouldn't find code that relies on `"foo" == "foo"`.
I'm sorry if my comments are harsh but I really do believe C++'s issues are mostly cultural.
- loup-vaillant 12y agoSo, accept the traps of the language as a fact of life, and just avoid them? No, that doesn't fly with me. Programming languages aren't Forces of Nature, they are human artefacts. They can be corrected. Of course you should never rely on `"foo" == "foo"` and other such things. Still, one would expect literal strings in the language to be of the preferred string type. C++ is the only language I know of that breaks this expectation. It does not follow the principle of least astonishment. That, is not a cultural issue. That said, I'm willing to accept that C++ do have cultural issues. Could you tell me what they are?