@rayman22201 As far as I know, destructors can be slower in no-single-ownership 
environments. That's why some languages (e.x. Rust) do the opposite of what Nim 
is doing now --- they introduce optional GC for cases when it's useful / more 
natural. 

@Araq > Destructors, assignment operators, the move optimization are coming Did 
I misunderstood you when you once said move optimization already here?  I also 
think regions would still be nice to have as, if I get the idea behind them, 
they can serve as a memory pool, which is a nice optimization.

I remember you always saying people who want to limit GC usage just don't get 
it and it'll be fast anyway so why bother. Of course destructors have 
advantages of their own (like deterministic freeing you mentioned) but if you 
say Nim's GC is so blazingly fast (I don't doubt it, I just no real experience 
with GCs) --- why bother about performance? Couldn't destructors just be used 
where performance doesn't matter as much and you want them for other reasons? I 
mean, you wrote you'd like to avoid ref "as far as reasonable" \--- isn't it 
turning Nim upside down? You also mentioned slices, which we were talking about 
once (well, I'm quite shocked you're convinced to this idea in the end). Also, 
I can see you'd like to utilize Rust-like move instead of C++-like (or so does 
sink analysis suggest).

By the way: you also mentioned using var more in the blog post. I have to admit 
I like it very much, var is nice. The same for avoiding returning (although 
abstracting them away would be better, I guess).

Reply via email to