On 5/18/13 7:13 AM, Simen Kjaeraas wrote:
On Sat, 18 May 2013 09:14:30 +0200, Walter Bright
<newshou...@digitalmars.com> wrote:

On 5/18/2013 12:08 AM, deadalnix wrote:
On 5/17/13, Walter Bright <wal...@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?

Damnit, I thought we'd gotten through to you. non-null pointers have no
default, and it is a compile-time error not to initialize them.

This is what I call the "low potential energy mental block". Very hard to get out of.

Andrei

Reply via email to