Go, D, and the GC
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 7 11:38:34 PDT 2015
On 10/07/2015 04:13 PM, Meta wrote:
> On Wednesday, 7 October 2015 at 09:59:05 UTC, Timon Gehr wrote:
>> struct S{
>> @disable this();
>> @disable enum init=0;
>> }
>>
>> void main(){
>> S s; // error
>> auto d=S.init; // error
>> }
>
> That's just awful.
I was responding to:
> The above shows that you cannot construct such a type in D. The
> language simply does not allow you to cancel a certain feature
> of the type in which you are uninterested.
Obviously there should be a nicer way to do this, but the above claim is
simply untrue.
More information about the Digitalmars-d
mailing list