@araq: Your example is demonstrating moving a _constant_ tree around has never 
been easier.

It is showing the happy path because `isolate()` is able to take your const 
JSON tree and isolate it; when trying to pass anything else, `isolate()` is no 
longer able to do the job and will tell you `expression cannot be isolated`.

Unfortunately, my data is usually not constant.

You already mentioned `unsafeIsolate()` in your snippet, which is just casting 
the value to `isolated[T]`, without actually checking if this is the case. But 
now you're on your own - your code might work today but fail in interesting 
ways ten months from now. The programmer now has the responsibility to make 
sure the tree is isolated, but if it is not you run into undefined behavior - 
or a early crash if you are lucky.

Reply via email to