Hacker News new | past | comments | ask | show | jobs | submit login

Yeah, it either has to cast from Object all the time, or spend JIT compiler time and memory figuring out if it can elide those checks (probably with exception code for when it guesses wrong).



Without generics, the developer would have to cast from Object anyway.


The point is that if Java had had generics in the beginning, they could (perhaps) have been integrated into the language in a way that obviated those casts entirely.




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

Search: