Struct with default ctor (Was: [dmd-beta] dmd 2.064 beta take 2)

deadalnix deadalnix at gmail.com
Sat May 18 13:12:46 PDT 2013


On Saturday, 18 May 2013 at 18:41:49 UTC, Walter Bright wrote:
> On 5/18/2013 12:30 AM, deadalnix wrote:
>> On Saturday, 18 May 2013 at 07:14:29 UTC, Walter Bright wrote:
>>> What default would you use for non-null pointers?
>>
>> Compile time error as a default sound like a nice option. 
>> Probably too late now,
>> but that is where most language are going now, and having done 
>> quite a lot of
>> java myself, I can guarantee you that it make sense.
>
> D has that:
>
>    @disable this();
>
> which is not the same thing as allowing default constructors. 
> See:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=10102

I played with that. It ensure nothing, convey intent at best.


More information about the Digitalmars-d mailing list