by paavohtl · 7y ago · 0 comments
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...?