HN2new | past | comments | ask | show | jobs | submitlogin

Rust's lifetimes need full subtyping, with covariant and contravariant type constructors (though I don't think it supports annotations for them, and always infers them instead), which I think would make the generics implementation quite a bit more complicated than it currently is...


Yeah, the fact that co/contravariant type constructors aren't (or aren't always?) annotated has always felt a bit awkward to me. Ah, well, it works :)




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

Search: