Re:Immutable.rs: immutable data structures for Rust
by raphlinus on Friday April 06, 2018 @05:40PM
(#16777694)
Thanks for the shout-out. You can also read the docs[0] about the rope data structure (the release is a bit old, if you're really curious git master is better).
I admit this is a fairly specialized use case, for most things xi uses mutability in a controlled way.
Re:Immutable.rs: immutable data structures for Rust
by taeric on Friday April 06, 2018 @05:24PM
(#16777589)
I saw downthread a link to someone talking about how you can already treat the standard collections as values. Has a good argument for how it can be beneficial to keep the same interface regardless. Has a good concession that there are definitely use cases where persistent collections make sense. I'd imagine they are not as common as one could expect. (I grant they are also likely more common than I expect. :) )
They make an interesting argument about how Rust makes it easier and nicer to write these kinds of structures.
It's still an area of exploration in Rust generally though; I wouldn't say immutable data structures are idiomatic, but that's also just because we haven't had a ton of easy ones to use, so nobody uses them. So we'll see!