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

On reflection I think they were referring to both traits and trait objects instead (“Call tables”). I don’t know what more you can ask for than the Rust Book’s entry on trait objects. Not sure how you get “immature language” from this page:

https://doc.rust-lang.org/book/ch17-02-trait-objects.html



Trait objects are kind of a pain and there are some improvements that could be made there.

Here's a random example: if you want a trait object with more than one trait, that only works today if one of the two is an auto trait: https://play.rust-lang.org/?version=stable&mode=debug&editio...




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

Search: