opStar

Janice Caron caron800 at googlemail.com
Mon Nov 12 09:12:48 PST 2007


On 11/12/07, BCS <ao at pathlink.com> wrote:
> s.a; //-> a.opDeref.opDeref.opDeref.a

You mean s.opDeref.opDeref.opDeref.a
Yes

> s.b; //-> a.opDeref.b

If we go with Bill Baxter's idea, that would be a compile error, since
a.opDeref.opDeref.opDeref has no member called b. To get at b, you'd
have to do:

s.this.opDeref.this.b

...or something! Obviously the syntax is still under discussion. But
go back and look at Bill's excellent post in which he makes clear that
going through opDeref should be done always (if it exists), unless
explicitly prevented by some means.

> s.c; //-> a.opDeref.opDeref.c
> s.d; //-> a.d

Likewise.


> this causes some odd "tiny changes make huge differences" issues along with
> another hijacking case.

Yeah, I think Bill covered that. Of course the syntax isn't nailed down yet.


> I'm just saying these need to be considered, not that they are killers to
> the idea.

They do indeed. I agree.



More information about the Digitalmars-d mailing list