> That's pretty much --gc:regions. We could revive this mode but I remain > unconvinced, cross-region pointers are quite some effort to detect -- either > dynamically or statically.
Those are great points. Even writing out my example above I started questioning how you'd transfer between memory allocator types, then scoping and copying etc. So far I've actually had pretty good speed on embedded devices, even with the parts that allocate freely and lately become much less concerned with avoiding it lately. Eh, I think just tweaking profiling tools might be more useful. > Given the right =copy and =destroy operations you can actually have checked > cross-region pointers but I have never tried a prototype. That's intriguing, but does seem like more of an experimental library kind of thing. > Also: Nim's strings, seqs, ref and .closure procs/iterators allocate, nothing > else does. Arrays don't, openArrays don't, bitsets don't, enums and object > don't... Nim is really good at this thing. Yes, I love that about Nim. Made my life so much nicer. Though just non-cyclic closures and async would be much more useful IMHO (if still hard to do). Heh, "yes to cyclic imports, no to cyclic-async". ;)
