opStar
Janice Caron
caron800 at googlemail.com
Sat Nov 10 01:21:41 PST 2007
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?
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