Docs: Section on local variables
Kagamin
spam at here.lot
Sat Apr 21 09:45:03 PDT 2012
On Saturday, 21 April 2012 at 09:15:14 UTC, Jonathan M Davis
wrote:
> init solves the larger problem of uninitialized variables being
> garbage and
> resulting in non-deterministic behavior. And it solves it in
> more places than
> the Java and C# solution does
Flow analysis catches the bug early (at compile time): the
default value of null is not what you want in most cases, and you
don't want null to leak into your system and cause a crash at
unknown time, unknown place, whether it will be deterministic is
another question. In .net the problem is worse because strings
are classes there and calling member methods on a null string
causes NullPointerException.
More information about the Digitalmars-d
mailing list