2 ms·
The two have very little to do with each other. What one could say is that higher level functional-like patterns are less idiomatic in Rust, because they abstra
by zozbot234 3y ago
The two have very little to do with each other. What one could say is that higher level functional-like patterns are less idiomatic in Rust, because they abstract away from the low-level control that Rust also provides - which is why Rust chooses to provide, e.g. GAT's as a language feature as opposed to HKT's.
But functional programming is fully supported and lack of GC is not an issue, since you can use Rc<> and Arc<> where needed. (Support for 'pluggable' tracing Gc<> will probably be added at some point, but it will need local allocators, which are not a stable feature yet.)
- amelius 3y agoOh yes, some basic form of FP is supported in Rust, but it's not the real thing. You can't write idiomatic FP because you really need a GC for that as the reference patterns created by closures are always cyclic. There's a reason why Haskell needs a full-fledged GC.