Naked dot - accessing object fields through unqualified "." [C1]

Tom Hawtin Thomas.Hawtin at Sun.COM
Mon Mar 30 06:37:58 PDT 2009


Joseph D. Darcy wrote:
> Alexandre MAKARENKO wrote:

>>         .x = x; // compiles like this.x = x;

> I don't think being about to elide "this" in such situations would be 
> very helpful; at least having to write out "this.x" gives some clear 
> indication you aren't assigning x to itself!

I would be more inclined to add a proposal for longer syntax to refer to 
local variables:

         this.x = local.x;

Unfortunately I've not been able to come up with a reasonable syntax 
(without introducing a new keyword).

Tom Hawtin



More information about the coin-dev mailing list