Should out/ref parameters require the caller to specify out/ref like in C#?

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Mon May 29 01:22:23 PDT 2017


On Monday, 29 May 2017 at 07:51:13 UTC, Jonathan M Davis wrote:
> I expect that we're going to see a DIP related to rvalue 
> references at some point here, because some of the folks 
> (particularly the game folks) think that it's critical to be 
> able to have a function that doesn't care whether it's taking a 
> value by value or by ref - just that it takes it efficiently, 
> and they don't want to be forced to use auto ref to do it 
> (since that requires templates).

So it would use ref or value depending on the target platform? I 
guess that could make sense since some platforms allow vector 
registers as parameters, but it sounds more like an 
implementation detail?

Or did you mean something else?


More information about the Digitalmars-d mailing list