Challenge: write a reference counted slice that works as much as possible like a built-in slice

Elronnd elronnd at
Wed Dec 15 09:50:37 UTC 2021

On Wednesday, 15 December 2021 at 08:27:25 UTC, RazvanN wrote:
> I would vote for having a dip that would somehow make it easy 
> to express the intent that you want to avoid destruction for a 
> specific object.

What about permitting 'union { S s; }' at function scope?  It is 
a slightly odd syntax; but it it consistent and, well, if you are 
trying to void initialise or bypass deconstruction, you are 
already plumbing dirty parts of the language.

More information about the Digitalmars-d mailing list