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

12345swordy alexanderheistermann at gmail.com
Wed Jul 25 17:52:00 UTC 2018


On Wednesday, 25 July 2018 at 16:43:38 UTC, Paolo Invernizzi 
wrote:

> That's an opinion, naturally.

No I am expressing an argument not an opinion.

> "let's force the programmer to think about what he is doing, 
> passing an rvalue by ref"
Nonsense, you have shown no evidence that they don't know what 
they are doing when making a automatic conversion. You might as 
well argue against the existence of var.

> At best, is "let's catch early some bugs (caused by other 
> problems as Manu pointed out)".

He also pointed it is own class of problems, as it can be 
replicated without ref.

> Set of problems as automatic promotion or conversion, as 
> decades of problems with unsigned/signed have proved...

False Equivalence. We are not discussing numeric overflows here.

> There's not a magic conversion between apples and oranges in a 
> foreach loop... ref value apart.

https://dlang.org/spec/type.html#usual-arithmetic-conversions
You where saying?


-Alexander




More information about the Digitalmars-d mailing list