Hacker News new | past | comments | ask | show | jobs | submit login

  > In my opinion it is a pity that HKT wasn't there from 
  > day one.
I think this shows a misunderstanding of the genesis of Rust. :P Literally the only feature of early Rust that has survived to the present day has been the use of `unsafe` blocks to cordon off bits of code that cannot be statically checked for safety (I don't count things like generics as having survived from early Rust, because early Rust used Java-style virtual dispatch for generics rather than C++-style monomorphization (nor did it have typeclasses, because traits weren't conceived until later)). From day one, the goal has simply been to make a systems language that was safer than C++, and it's taken years to figure out how to do that effectively. And as a goal-oriented language, features are cheap: Rust has thrown out more features than most languages will ever have. The fact that HKT aren't there yet is because they're merely a nice-to-have rather than strictly necessary (in the way that lifetimes are strictly necessary), and because Rust has never particularly valued maximal expressivity in the way that e.g. Scala has. In the meantime, just because generic monads aren't possible doesn't mean that monads can't be approximated for specific types like Result and Option, and the lack of them isn't going to prevent Rust from its goal of being a replacement for C++.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: