DIP 1016--ref T accepts r-values--Community Review Round 1

Paolo Invernizzi paolo.invernizzi at gmail.com
Wed Jul 25 12:40:16 UTC 2018


On Wednesday, 25 July 2018 at 08:34:30 UTC, Manu wrote:

> With UFCS as a super popular feature of D, 'this' is not really 
> much of a
> special guest at all.
> It's just as much the first argument of a function as the first 
> argument of
> *any* UFCS call.

Guido van Rossum has raised an objection on that a couple of 
decades ago...

>> There's a tension between Walter effort in turning D as a 
>> suitable language for memory correctness, and a good candidate 
>> for writing 'bug free rock solid software fast' and the 
>> continuous addition of features like this.
>>
>
> This isn't 'a feature' so much as lifting a restriction for the 
> sake of a
> bunch of uniformity and simplification.
> I can't really see how you can find that disagreeable from your 
> apparent position...

That proposal is a 'Syntactic Sugar' feature, that simply hide 
what normally need to be explicitly coded: proved a temp rvalue, 
pass it to a callable taking ref. What you call 'simplification', 
I call it 'obfuscation'; what you call uniformity I call trying 
to spread a well justified restriction...

>> Finally, sorry to use often the term 'feeling', and sorry for 
>> not being constructive: but really is a 'feeling'... I don't 
>> pretend to be right. So no problems in just ignoring that
>>
>
> It upsets me when people present strong opinions about this who 
> literally have no horse in the race. This is only really 
> meaningful, and only affects you if it actually affects you... 
> It's clearly not important to you, or you wouldn't be basing 
> your opinion on *I kinda feel...*
>
> Jonathan's argument is similar. He's worried about something 
> that this
> thread has tried and failed to determine exactly what is.
> Meanwhile I think we have determined that the presumed 
> practical trouble cases are even less that I suspected up front.

Experience, in programming, has value: Walter is famous for his 
anecdotes on that.

D2 has already a lot of problematic stuff to solve, I not buy 
adding more (yes) features for the sake of an hypothetical 
'simplification' of what it's already possibile.

Just to be clear, I'm also against all the new proposed addition 
for, named parameter, new struct initialisation and so on....

No pun, really :-P

/Paolo




More information about the Digitalmars-d mailing list