6 ms·
It's the price to pay for implementing generics via type erasure, not for getting functional features in a statically typed language. http://stackoverflow.com/a
by philippelh 12y ago
It's the price to pay for implementing generics via type erasure, not for getting functional features in a statically typed language. http://stackoverflow.com/a/24421331 http://stackoverflow.com/a/24421331
- eeperson 12y agoThis isn't necessarily due to erasure. This actually about boxing. Reified generics is one way to solve this. Another option is tagged pointers. That is how OCaml handles this[1]. [1] http://stackoverflow.com/questions/3773985/why-is-an-int-in-ocaml-only-31-bits http://stackoverflow.com/questions/3773985/why-is-an-int-in-... edit: clarity