Things that keep D from evolving?
rsw0x via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Feb 12 09:39:38 PST 2016
On Friday, 12 February 2016 at 17:29:54 UTC, Matt Elkins wrote:
> On Friday, 12 February 2016 at 17:20:23 UTC, rsw0x wrote:
>> On Friday, 12 February 2016 at 15:12:19 UTC, Steven
>> Schveighoffer wrote:
>>> On 2/12/16 9:37 AM, Matt Elkins wrote:
>>>> [...]
>>>
>>> Pass by reference and pass by value means different treatment
>>> inside the function itself, so it can't differ from call to
>>> call. It could potentially differ based on the type being
>>> passed, but I'm unaware of such an optimization, and it
>>> definitely isn't triggered specifically by 'in'. 'in' is
>>> literally replaced with 'scope const' when it is a storage
>>> class.
>>>
>>> -Steve
>>
>> note that 'in' and 'scope'(other than for delegates) parameter
>> storage class usage should be avoided.
>> It really should be a warning.
>
> Why is that?
Unless it has changed, 'scope' is a noop for everything but
delegates. Code that works now will break when(if...) it gets
implemented.
More information about the Digitalmars-d-learn
mailing list