null and type safety

Walter Bright newshound1 at digitalmars.com
Wed Nov 5 20:06:36 PST 2008


Jarrett Billingsley wrote:
> With nullable types, flow analysis doesn't have to be done.  It is
> implicit in the types.  It is mangled into function names.  foo
> _cannot_ take a pointer that may be null.  End of story.

Sure, which is why I was puzzled at the example given, which is about 
something else entirely.

What you're talking about is a type constructor to create another kind 
of pointer. It's a significant increase in complexity. That's why I was 
talking about complexity being a downside of this - there is a tradeoff.



More information about the Digitalmars-d mailing list