`const ref T` or `ref const T`?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Thu Aug 15 15:20:59 UTC 2024
On 16/08/2024 3:18 AM, Jonathan M Davis wrote:
> On Thursday, August 15, 2024 8:56:29 AM MDT Richard (Rikki) Andrew Cattermole
> via Digitalmars-d wrote:
>> On 16/08/2024 2:47 AM, Jonathan M Davis wrote:
>>> Either way, the person to convince would be Walter, and based on past
>>> discussions of this sort, I doubt that he'll be convinced, but who knows.
>>> It can sometimes be quite surprising what he does or doesn't agree with,
>>> and it's not like he never changes his mind.
>>
>> Considering that he allowed the abomination that is return and scope
>> ordering to result in two different attributes, it's worth talking with
>> him about it I'd say!
>
> That is indeed an abomination, and I'd love to see that fixed (though
> honestly, I'd love to see DIP 1000 thrown out entirely), but it's a very
> different situation from const ref vs ref const. The problem with
> return scope vs scope return is that it not only makes the order matter, but
> it makes it so that each order means different things. On the other hand,
> requiring ref const would be requiring a fixed order when we have no need to
> do so, and both orders are currently fine.
>
> - Jonathan M Davis
I'm currently writing up a proposal to replace DIP1000 in its entirety
and yeah I got great joy from writing the grammar removal for it 2 hours
ago!
More information about the Digitalmars-d
mailing list