Docs: Section on local variables

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Fri Apr 20 22:20:25 PDT 2012


"Andrej Mitrovic" <andrej.mitrovich at gmail.com> wrote in message 
news:mailman.2002.1334970925.4860.digitalmars-d at puremagic.com...
> On 4/21/12, Jakob Ovrum <jakobovrum at gmail.com> wrote:
>> The control flow graph takes care of correctly determining
>> whether a variable has been initialized.
>
> It is initialized. .init takes care of that.

Yes, it's initialized to .init by default. But .init may not be what the 
programmer intended it to be initialized to. You've never forgotten to 
initialize something that wasn't supposed to be T.init?

When an expicit initializer is left out by accident, C# knows. D doesn't 
know.




More information about the Digitalmars-d mailing list