3 ms·
Can you elaborate more what makes you think Rust isn't an expressive language ? And what feature your «functional programming language with low-cost abstraction
by stymaar 10y ago
Can you elaborate more what makes you think Rust isn't an expressive language ? And what feature your «functional programming language with low-cost abstractions» has that your miss with Rust ?
In my experience Rust is really close to OCaml in term of expressiveness. I don't know what feature Scala or F# have that Rust doesn't.
The only major thing I can think about is Higher Kinded Type in Haskell. They are indeed cool and there is work underway to add HKT to Rust (but nobody is sure yet if it's possible though).
- thinkpad20 10y agoI don't know a great deal about scala or f#, but I know scala has higher kinded types as well as implicit function arguments which are things that rust does not have. OCaml had parameterizable modules and functors, tail call optimization, and presumably other important features. I'm much more familiar with Haskell, which definitely has a lot of things that rust does not, not just higher kinded types but sophisticated type level programming, type families, functional dependencies, existential types, etc etc etc. Additionally it has lazy evaluation, a very sophisticated green threading system, software transactional memory, etc. Not to mention of course the purity. Haskell has a bunch that rust does not -- of course the reverse is true as well, but it's worth mentioning. At the end of the day, though, rust is meant to address use cases that no mainstream functional language does, and it is very successful at it, while also having a ton of really cool features which makes it very exciting for FP enthusiasts.
- stymaar 10y agoThanks !
- idobai 10y agoWhy would be rust an expressive language if it's really verbose, complex, hard to read and its typesystem is pretty much just a struct, an enumeration and a pseudo-typeclass? Have you ever compared rust code to functional code? Who said it first that rust is "expressive" and if it is compared to what high-level language? Rust is just a small subset of C++ with compile-time smart pointers - or reference counters/trackers which is just another(but effective) aspect of garbage collection. I don't understand how can rust receive so much hype - besides the borrow-checker rust hasn't brought anything new to the table. Yeah, "zero-cost abstraction" and stuff but it isn't like a new goal in PLT.