3 ms·
There are different kinds of error messages in C++, all of them terrible, but each for different reasons. Template error messages are often best understood as
by codeflo 5y ago
There are different kinds of error messages in C++, all of them terrible, but each for different reasons.
Template error messages are often best understood as stack traces of the “metaprogramming language”, which isn’t C++, but a complicated type substitution system that beginners don’t understand when they first encounter these errors. So that’s confusing.
But I found that the hardest errors for beginners are linker errors: They look like line noise and contain no easily readable information to point at the source of the problem. It shouldn’t be necessary to explain linker hacks from the 80s when teaching someone how to find out what they forgot to implement.
- GuB-42 5y ago> But I found that the hardest errors for beginners are linker errors I am with you on that one. I just didn't consider the linker as part of the compiler. I mean, wtf is a ctor and a vtable? Now, I know, but when I started programming, the linker was the scariest part for me, and it took me a while to be somewhat comfortable with it. Obviously, error messages didn't help. The good thing is that linkers (static and dynamic) don't change as much as compilers, so it is useful knowledge in the long run. Understanding ELF files really helped me on that one.