Bug?: Presence of "init()" Method Causes std.array.appender to Fail to Compile

Nick Treleaven nick at geany.org
Mon May 14 11:53:44 UTC 2018


On Monday, 14 May 2018 at 01:20:38 UTC, Jonathan M Davis wrote:
> Yeah. It's been discussed that it should be illegal to declare 
> a struct or class member named init, but that change has yet to 
> happen.
>
> https://issues.dlang.org/show_bug.cgi?id=7066

Walter and Timon have considered redefinition potentially useful. 
A compromise would be to require `init` and `stringof` to be 
`static`. That would probably prevent the accidental conflicts 
that arise with `init`.


More information about the Digitalmars-d mailing list