ctietze, I experimented with Non-Copyable types in Swift.
I really like that I can enforce borrowing and consuming.
It's a tough sell to inline 'traits' from what used to be protocol, though.
I need to think a bit more on this -- because for this particular type which I don't want to live in multiple places, an underlying reference may change a pointer somewhere.
Maybe I need a different abstraction to have the thing 'expire' properly.
Add comment