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

Rust's traits were indeed inspired by typeclasses, so those coming from Haskell shouldn't have much difficulty with these kinds of errors. The tricky thing is trying to make it easier for those who don't have that experience.


Hardly accurate but coming from the C# world I thought of traits as a hybrid between an interface and extension methods. I think the biggest challenge was that, at first glance, a trait does appear to be very close to an interface, but really it is it's own beast.




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

Search: