2 ms·
Well, but by this definition C++ is a bad language :) Don’t get me wrong, but if it’s hard to write an algorithm to parse it - then how do you expect humans to?
by heavenlyblue 7y ago
Well, but by this definition C++ is a bad language :) Don’t get me wrong, but if it’s hard to write an algorithm to parse it - then how do you expect humans to?
- ncmncm 7y agoSimply: humans do not like to write code that compilers find hard to parse. So in practice it doesn't matter very much. Natural languages are enormously harder to parse than any programming language, and people delight in expressing just the constructs that are hardest to parse, yet people do not usually have difficulty communicating with one another. When they do, syntax troubles are vanishingly rarely the reason.
- TheCoelacanth 7y agoHumans aren't able to correctly parse C++. There are numerous examples, but a common one is that humans will usually parse `T x();` as constructing an object of type T with the default constructor, but it actually is a forward-declaration of a function returning T.