> 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 an early crash if you are lucky.

Actually, it's not undefined behavior, it's simply always wrong, it's just that 
the tooling cannot detect it. I claim that it's not hard to ensure isolation 
for a programmer, but it's hard for Nim's type system. We need real usability 
data on these things and if you think that your experiments with "actors" is a 
valid data point I have to say that I don't agree:

  1. You managed to get it to work regardless.
  2. Non-blocking, multi-threaded runtimes on top of event loops are 
expert-only territory. The ordinary Nim programmer doesn't write these systems.


Reply via email to