The daily D riddle

Daniel Kozak kozzi11 at gmail.com
Sun Jan 28 11:41:44 UTC 2018


https://run.dlang.io/is/gVL0g7

On Sun, Jan 28, 2018 at 12:23 PM, Seb via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> 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!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20180128/d8739a4d/attachment.html>


More information about the Digitalmars-d mailing list