rename this to ctor

davidl davidl at 126.com
Wed Apr 1 07:17:33 PDT 2009


在 Wed, 01 Apr 2009 20:04:09 +0800,Christian Kamm  
<kamm-incasoftware at shiftatleftanddelete.de> 写道:

> 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.
>

Oh, right, you are pushing it further bit than I ;) I totally agree with  
you.



More information about the Digitalmars-d mailing list