3 ms·
It is ungodly complex, but no one needs to understand all this complexity just to use the language to write application code. "do's and don'ts are all over the
by protomolecule 3y ago
It is ungodly complex, but no one needs to understand all this complexity just to use the language to write application code.
"do's and don'ts are all over the place and even a thing "simple" as a cast can lead to UB"
And most of these things were present in the first revision of the C++ standard or even in C.
"You don't need to be a compiler engineer to make good use of such information."
Why do you think that a programmer has to learn C++ by reading the standard? One does need to have a good mental model of what's happening but it's enough to have a much much simpler mental model than the standard.
"and then to map what is valid in which version"
That's where skills acquired 5-10 years ago are most relevant)
- DoctorDabadedoo 3y agoApplication devs don't need to know the spec, but someone in the committee having a hard time of knowing the language in full is an interesting fact of how complex the language itself is. "Why do you think that a programmer has to learn C++ by reading the standard?" If your application seg faults due to an ill type deduction caused by `auto`, why did it fail? What kind of type deductions auto covers? Experience by trial and error will hardly help you here. End user developers will acquire that knowledge probably by reading digested material from experts either focused on language tidbits or working closely to the standard (Effective C++, Effective Modern C++, blogs, etc.), the root source is still the spec, the more complex the spec is, by transitivity, the more complex is anything that comes out of it. I guess the bottomline is that we agree the language is complex and I'll leave it at that.
- protomolecule 3y ago"the more complex the spec is, by transitivity, the more complex is anything that comes out of it" Yeah, that's why so many languages don't have spec at all.