Proposal : allocations made easier with non nullable types.

Nick Sabalausky a at a.a
Mon Feb 9 23:44:48 PST 2009


"Alex Burton" <alexibu at mac.com> wrote in message 
news:gmqrec$2va3$1 at digitalmars.com...
> I would propose that library writers have to use the X * x pointer 
> notation to do their null pointer low level library implementation stuff, 
> and the rest of us use X x which becomes more difficult (not impossible) 
> to make null.
>

So are you suggesting this?:

X* x; // Ok, can be null
X x; // Ok, cannot be null
X? x; // Illegal

If so, I'd have to strongly disagree. That would force the people who need 
nullability to muck around with the pointers and the extra level of 
indirection that implies, which will be far more problematic for them then 
if they just used a nullable non-pointer:

X? x;

We need all three. 





More information about the Digitalmars-d mailing list