The daily D riddle

Seb seb at wilzba.ch
Sun Jan 28 11:23:57 UTC 2018


On Sunday, 28 January 2018 at 06:44:28 UTC, Timothee Cour wrote:
> why is `a.init` even legal? (instead of typeof(a).init)
> likewise the following compiles, but IMO should not:
> class A{ void fun(this a){}}
> (instead we should have typeof(this)
>
> How about deprecating these lax syntaxes?
> they serve no purpose (we should use typeof(...)) and can cause 
> harm
> in generic code

Yes, good idea!


More information about the Digitalmars-d mailing list