On Wednesday, 2 October 2013 at 02:10:35 UTC, Nick Sabalausky wrote:
I thought variable.init was different from T.init and gave the value of
the explicit initializer if one was used. Was I mistaken?:

import std.stdio;
void main()
{
        int a = 5;
        writeln(a.init); // Outputs 0, not 5
}

AFAIK "variable.init" just triggers the "static call through instance" mechanic:

The *variable* a doesn't actually have .init, so the call resolves to "int.init".

Reply via email to