In order to explain why I'm wrong, you all had to discuss a million things that were not in the tutorial.
I will admit I'm a beginner here, and I can't really argue what will happen with different compiler settings, different architectures, and slightly modified versions of my code, but what I do know is this:
1. I read all of this site's tutorials on three separate occasions.
2. I'm not an idiot.
3. After reading the tutorial and trying everything, I struggled more than with any other computer language. I don't think it's just because C++ is more complex, I think it's because a lot of things were not explained to me.
I think there is a dramatic differences between our goals. My goal in reading this tutorial is to be able to USE the language later with a reasonable amount of effort. It seems to me that this site is overly concerned with
not being wrong.
behavior that is not defined as either allowed or forbidden in the C++ standard, should not be expected to have a mention the tutorial. |
I completely disagree, if behavior is undefined for a particular pattern, then using that pattern could produce code that is not portable. The fact that it's not portable means it should be avoided. Hence, it deserves mentioning.
I'm not saying that the tutorial needs to say "it works
this way" or "
that way", but I do think you need to mention undefined behavior if it is likely to impact the developer. If it's undefined behaviour, FINE, just say in the tutorial that it is undefined. Then give us a recommended way to do things.
The bottom line is that most people reading a tutorial want to be able to use the language when they are done, and if the tutorial is not helping them they will switch to something else. If you care about your business then that should concern you.