by throwaway487550 · 7y ago · 0 comments
* Universal pattern-matching (everywhere)
* Obvious syntactic sugar for defining and applying curried
functions, partial application.
* Type-classes (as a one single major innovation in PL
since Smalltalk)
* receive (or select) with pattern matching (Erlang, protobuf).
* first class typed channels (Go).
* multimethods (CLOS).
Thank you!Where are you missing pattern matching? The only place I can think of where it can't be used currently is the function signature. Might be hard to retrofit to the current syntax.
> Type-classes
Rust's traits are type-classes.
> first class typed channels
Why do they need to be first class? Unlike Go, Rust's type system is powerful enough that type-safe channels can be (and have been) implemented as a library. See crossbeam-channel.
fun map f [] = []
| map f (x::xs) = (f x) :: map f xs;
And boy, no TCO. What a shame.There is TCO, just not guaranteed. We’d like it; we have even reserved a keyword. Needs an RFC though.
And the functor typeclass in Rust looks like...?