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

Paolo Invernizzi paolo.invernizzi at gmail.com
Wed Jul 25 19:55:50 UTC 2018


On Wednesday, 25 July 2018 at 17:52:00 UTC, 12345swordy wrote:
> 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.

I don't know what vocabulary you are used to consult, but your 
'pointless' it's a plain and simple opinion. To me it's not 
pointless at all.

>> "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.

Actually, by definition, every bug is made by a programmer that 
THINK to know what he is doing... no? Aren't you. going a little 
too far in  judging?

>> 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.

An so? Jonathan argumentation and mine is that are are. losing a 
way to catch such bugs earlier.

>> 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.

It's not a false equivalence fallacy: all the discussion is about 
IMPLICIT conversion or rvalues to lvalues... your argumentation 
smell a little about strawmen (eheh)

>> 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?

I'm saying that a foreach statement is easily lowered mentally in 
a for statement, and that implicitly converting between rvalue 
and lvalue is entirely another beast.

I will stop here... btw


More information about the Digitalmars-d mailing list