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

Note that this works because Rust doesn't have inheritance, so variance only comes up with respect to lifetimes, which don't directly affect behavior/codegen. In an object-oriented language with inheritance, the only type-safe way to do generics is with variance annotations.


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

Search: