Error: constant false is not an lvalue
Jarrett Billingsley
jarrett.billingsley at gmail.com
Sun Aug 30 12:17:40 PDT 2009
On Sun, Aug 30, 2009 at 3:14 PM, Jarrett
Billingsley<jarrett.billingsley at gmail.com> wrote:
> On Sun, Aug 30, 2009 at 3:02 PM, Rainer Deyke<rainerd at eldwood.com> wrote:
>> The purpose of default initialization is not to find or reduce bugs, but
>> to reduce the size of legal programs.
>
> I'm wondering where the heck you got that justification.
Also, the spec says this:
"Members are always initialized to the default initializer for their
type, which is usually 0 for integer types and NAN for floating point
types. This eliminates an entire class of obscure problems that come
from neglecting to initialize a member in one of the constructors."
http://www.digitalmars.com/d/1.0/class.html
This suggests, to me, that default initialization _is_ - at least in
Walter's mind - supposed to eliminate bugs.
More information about the Digitalmars-d-learn
mailing list