`const ref T` or `ref const T`?

Sebastiaan Koppe mail at skoppe.eu
Thu Aug 15 19:12:03 UTC 2024


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. :(


More information about the Digitalmars-d mailing list