One thing that seems to have been missed in this discussion: minimize (or at least reduce from C++ levels) undefined behavior. That's the reason for auto-initialized variables. It's not to provide aconvenience for those times when the default values are what you want. It's so that failure to initialize will cause your program to fail in consistent and predictable ways. It is also the reason for providng clear() as an alternative to delete(). Dereferencing dangling pointers results in undefined behavior. Accessing a cleared object results in admittedly bad but at least defined behavior.
- Re: A summary of D's design principles BLS
- Re: A summary of D's design principles Lutger
- Re: A summary of D's design principles Justin Johansson
- Re: A summary of D's design principles Lutger
- Re: A summary of D's design principles Justin Johansson
- Re: A summary of D's design principle... lurker
- Re: A summary of D's design principle... Andrei Alexandrescu
- Re: A summary of D's design principle... Walter Bright
- Re: A summary of D's design principles Jay Byrd
- Re: A summary of D's design principles JMRyan
- Re: A summary of D's design principles Walter Bright
- Re: A summary of D's design principles Bruno Medeiros
- Re: A summary of D's design principles bearophile
- Re: A summary of D's design principles Bruno Medeiros