rename this to ctor

Christian Kamm kamm-incasoftware at shiftatleftanddelete.de
Wed Apr 1 05:04:09 PDT 2009


davidl Wrote:
> Yeah, all the merits of ctor just outweigh its demerits. The only demerit  
> of it is taking "ctor" to join the keyword list, However it also bans  
> people from using ctor as a var( it might be positive! )

If you make ctor a keyword that doesn't behave like an identifier almost everywhere, I fear you'll just replace 'this' by 'ctor' without much benefit. I can't see a good reason for the constructor function name to be a keyword. Maybe something like opCtor or opConstruct would fit better with the existing special functions though.




More information about the Digitalmars-d mailing list