|
|
|
|
|
by hderms
2519 days ago
|
|
Imo you have to allocate something else if you are going with an immutable paradigm. You can do clever sharing of data structures, but ultimately if you're modifying the whole thing, you're modifying the whole thing and sharing can only go so far. It seems like further advances in this space either require giving the compiler a better understanding of what is "actually" shared and in what way (i.e. Rust and knowing when mutations are externally visible), or making copying cheaper. Mutability is always (at least as current computer architectures are concerned) going to be faster in a general sense. |
|
https://docs.rs/im/14.1.0/im/