Ref (was Re: inlining)
Walter Bright
newshound1 at digitalmars.com
Fri Jul 18 13:34:42 PDT 2008
Matti Niemenmaa wrote:
> superdan wrote:
>> before you say, "but value vs. 'in' is entirely transparent to the
>> user", let
>> me note that aliasing is going to fuck that plan right there.
>>
>> deciding value vs. reference only works for invariant shit. it's in
>> fact part
>> of why invariant shit is so fucking brilliant.
>
> If it's a const reference, aliasing doesn't matter, no? Or am I missing
> something about D2's latest const system (quite possible)? One should
> only be reading from a const ref so it's semantically equivalent to just
> 'in'.
It would have to be an invariant ref, not a const ref, for aliasing to
not matter.
>
> 'inout' should still be there, with reasonable aliasing restrictions.
>
More information about the Digitalmars-d
mailing list