> Only Rust has memory safe zero-copy collection that can be stored in a type 
> (their slice type).

Not exactly. Only Rust has this 
_[plus](https://forum.nim-lang.org/postActivity.xml#plus) compile-time safety 
checks and zero runtime overhead. But Go's slices are memory-safe and zero-copy 
and can be stored, for example. It accomplishes this by having the slice type 
contain a hidden reference to the object that owns the memory; thus the GC 
ensures that a slice can't outlive its backing store.

That would be pretty easy to support in Nim. I could easily make such an object 
myself, it just wouldn't work the same as an array/seq/string, as I said above. 
But thanks for the pointers [sic] to the "it" templates and zero-functional; 
I'll check those out.

Reply via email to