On 9/17/11 11:59 AM, Marijn Haverbeke wrote:
- The implicit, clever approach: Notice that the only situation where
you want to do this is when using a local variable (you can't move out
of data structures) for the last time, and simply make the compiler
optimize the last use of a variable into a
If an explicit copy operator is needed for uniques, then this isn't even
ambiguous, is it?
So I guess you're planning to make vectors and strings (and anything
containing them) also explicit-copy-only? In that case, I guess we're
fine. (Though, with strings, I expect this to cause some pain.)
I'm less concerned about blocks than I am about @fn (which we still have
AFAIK) and objects.
To recap, immutably rooted references (which is most of them) are safe
as long as their root isn't touched. So closures and objects don't
cause a problem there. Mutably rooted references are the
On 16/09/2011 2:10 PM, Marijn Haverbeke wrote:
The original solution proposed was to pass the accessor a block and
pass the value to that block by reference. This would cause blocks to
spring up everywhere (with all the indentation and noise that comes
with it) and be extremely un-composable. A