ideas about ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri May 22 13:40:55 PDT 2009


Steven Schveighoffer wrote:
> ref accomplishes all of this, except you can't get at the underlying 
> pointer to do things like compare to null or rebind.  Maybe we simply 
> need some new operators to get at the ref addresses.

Defining null references has been on the table too. I wrote a paragraph 
about them and then deleted it in fear of major aggravation.

There's no need for new syntax. We can easily define things such that 
you can return *null when a reference is expected and checking 
&(r.popNext()) is null to figure out what's happening. I think it's bad 
design though.


Andrei



More information about the Digitalmars-d mailing list