D's "accessors" are like abusing operator overloads

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Mar 27 12:37:39 PDT 2009


On Fri, Mar 27, 2009 at 3:13 PM, Denis Koroskin <2korden at gmail.com> wrote:
>
> int x = 5;
> writefln(x.init); // prints 0; how is that possible?
>
> It should certainly be either disallowed or yield 5.

In DMD pre-1.017, it would print 5.  The language spec was changed
with that version.



More information about the Digitalmars-d mailing list