
From: Neal Becker <ndbecker2@gmail.com>
Rob Stewart wrote:
From: Neal Becker <ndbecker2@gmail.com>
I still disagree. Depending on default initialization is like depending on init of static variables to 0. If you really need a special init value, be explicit and say so. I see no logic to the default construct of complex to
What's wrong with relying on static initialization to get you a zero?
Explicit is better than implicit. Have sympathy for those that must read the code. If you require something to be initialized, say so. Don't leave it to the reader to guess whether it had to be initialized to zero, or just was by accident.
I fail to see how relying on behavior of the language is not having sympathy for those reading the code. This is akin to explicitly invoking a default base ctor in an initializer list in my mind. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;