Originally posted by DavidBrown
View Post
Also, read this:
https://accu.org/journals/overload/25/139/brand_2379/
And tell me you know all these initialization rules by heart. And you think everyone who programs C++ does also.
Yes, reading an uninitialiased variable it is still wrong. But by default initializing at least the behaviour is _deterministic_. Code crashes and the programmer runs it again. Next time it does not crash, because the variable is initialized to some sane value. Programmer: nah, was just a fluke .. No need to fix... You are a great programmer, for sure, never make a mistake. But I think you overestimate the capabilities of many programmers out there. I have seen programmers do this. Clearly it is why so many scripting languages are populair nowadays.
Comment