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

Haskell has it for its type classes in the form of existentials[1] too:

  forall a. SomeClass a => a
in Haskell is quite similar to

  &SomeTrait
in Rust.

[1] http://www.haskell.org/haskellwiki/Existential_type




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: