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

Walter Bright newshound2 at digitalmars.com
Sat May 18 00:14:30 PDT 2013


On 5/18/2013 12:08 AM, deadalnix wrote:
> On 5/17/13, Walter Bright <walter at digitalmars.com> wrote:
>> I oppose this. D has a lot of nice features because of the .init property.
>> Default constructors wreck that.
>
> So much great feature like :
>   - null all over the place.
>   - Having NUllable and NonNullable in phobos. BTW, NonNullable is unable to
> ensure that it if effectively non nullable.
>   - Having to check for .init state all over the place (which have a runtime
> cost, in addition to be error prone). RefCounted implementation is emblematic of
> that.

What default would you use for non-null pointers?


More information about the Digitalmars-d mailing list