new DIP5: Properties 2

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jul 27 20:13:53 PDT 2009


Rainer Deyke wrote:
> 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()'.

Oh. You stole my thunder.

+1


Adnrei



More information about the Digitalmars-d mailing list