`const ref T` or `ref const T`?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Thu Aug 15 19:22:42 UTC 2024
On 16/08/2024 7:12 AM, Sebastiaan Koppe wrote:
> On Thursday, 15 August 2024 at 15:20:59 UTC, Richard (Rikki) Andrew
> Cattermole wrote:
>> 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!
>
> I have to say I get a little bit anxious with people saying it needs to
> be removed or replaced.
>
> Not pretending it is sane to use - although I have grown accustomed to
> it - but the fact you can safely take refs to things is amazing. Both
> from a performance perspective as well as being able to implemente
> things like non-copyable types (which you then safely share via ref).
>
> Would be a real shame to see that go. Which won't stop me of course,
> except it won't be @safe anymore. :(
Yeah I get it, I have significantly more than 120k LOC of it.
I am not looking forward to having to change all that code.
But at the same time, DIP1000 isn't meeting our needs so it's time to go
back to the drawing board if we want D to be safe and my current design
I think looks pretty good.
More information about the Digitalmars-d
mailing list