new DIP5: Properties 2

Rainer Deyke rainerd at eldwood.com
Mon Jul 27 18:56:08 PDT 2009


Benji Smith wrote:
> 3) The existence of "magical" identifiers complicates the language
> design. Because the rules that apply to those magical identifiers is
> different than the rules applying to non-magical identifiers.

I don't see how that's the case.  Everywhere opGet_foo appears, it is
treated exactly like every other identifier.

The only thing "special" about these identifiers is that they can be
generated automatically by the compiler.  When the compiler sees 'a.b',
and 'b' is not a field or method of 'a', it rewrites this to 'a.opGet_b()'.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list