3 ms·
> It doesn't have in-built immutable data structures Immutable data structures by default would involve avoidable overhead, so that's why they aren't a built i
by zozbot234 5y ago
> It doesn't have in-built immutable data structures
Immutable data structures by default would involve avoidable overhead, so that's why they aren't a built in. There are well-known crates that do provide persistent data structures in Rust.
> Struct fields being private by default is a dead giveaway (unnecessary in an FP language).
Data hiding is just as useful in functional programming; in particular, it enables you to expose an interface to data that stays valid under any isomorphism, while preserving desired invariants. Structs with generally accessible and updatable fields are a special case.