Go, D, and the GC

Marc Schütz via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 5 03:39:29 PDT 2015


On Monday, 5 October 2015 at 09:25:30 UTC, Shachar Shemesh wrote:
> What's more, init is used even if you @disable this(). The 
> following compile and does what you'd expect (but not what you 
> want):
> struct S {
>    int d;
>
>    @disable this();
>    this( int d ) {
>       this.d = d;
>    }
> }
>
>
> ...
>
>    S d = S.init;

I don't understand this. How is that not what you want, 
considering that you explicitly told it to use the init value?


More information about the Digitalmars-d mailing list