Error: constant false is not an lvalue
Rainer Deyke
rainerd at eldwood.com
Sun Aug 30 20:42:47 PDT 2009
Jarrett Billingsley 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.
By looking at the actual effect of default initialization on the
language. Imagine D without default initialization. This would be a
syntax error:
int i;
Instead, you would have to write this:
int i = 0;
Clearly this imaginary variant of D is no more error-prone than D as it
actually is. If anything, it is less error-prone, because it forces you
to be explicit about how you want your variables to be initialized. It
is, however, more verbose.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d-learn
mailing list