opStar

Walter Bright newshound1 at digitalmars.com
Sat Nov 10 01:58:37 PST 2007


Janice Caron wrote:
> Since D lets us write p.member instead of (*p).member or p->member,
> where p is pointer
> 
> ...and since we now have opStar() to overload *p
> 
> ...does that mean that if a class A implements opStar(), and p is an
> instance of class A, then we get to write p.member to mean
> (*p).member? (Assuming no name clashes with A.member, of course)
> 
> If not, is this sugar planned for the future?

No. Please no!

> 
> opStar() is only partway towards the ability to make
> pointer-like-objects. If we're going that way, let's go all the way.



More information about the Digitalmars-d mailing list