Allow this() { } for structs

FeepingCreature feepingcreature at gmail.com
Sat Nov 7 15:00:51 UTC 2020


On Saturday, 7 November 2020 at 10:56:29 UTC, IGotD- wrote:
> On Saturday, 7 November 2020 at 01:39:30 UTC, Q. Schroll wrote:
>>
>> This is stupid; one shouldn't need to add useless parameters 
>> to any function, except maybe for compatibility with an 
>> interface. This isn't near that.
>>
>
> Speaking of stupid, what the compiler can do is lowering the 
> this() to something else.
>

It's not like it doesn't work because the compiler devs couldn't 
figure out how to do it, it's that it clashes with the notion 
that all data types should have a valid default value. (As I 
understand it.) My point with the Nullable thing is that this 
notion is dead regardless.


More information about the Digitalmars-d mailing list