Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

afaik Rust traits were directly inspired by the typeclass system in Haskell, which came about as a type-safe way to do the kind of ad-hoc polymorphism that you can do with interfaces in object-oriented languages like Java. Here's [1] a good talk by SPJ:

[1] https://channel9.msdn.com/posts/MDCC-TechTalk-Classes-Jim-bu...



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

Search: