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

Add invariant-only generic types (no subtyping relations between types with different type parameters) as a way to avoid 90% of casts. It doesn't get easier than this.

As for going further, I think covariance and contravariance, while conceptually simple, will always be too complicated to wrap your head around.

I think the future is invariant types + advanced generics functions. But research hasn't explored that direction yet. I might want to do that in the future.

If it's relevant to anyone's interest, feel free to contact me.



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

Search: