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

T keeps its type info statically. So if you put a Set in, you can get a Set out.

Casting to Collection loses the static type info, so you couldn't write foo(bar(set)) if bar returned a Collection but foo accepted a Set.



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

Search: