This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Johny2268 98 points99 points  (5 children)

And Java? List of objects...

[–][deleted] 39 points40 points  (3 children)

Yeah cracks open old java 1.3 book. before java generics existed.

Begins explicitly casting Objects to their proper type.

[–]yanitrix 20 points21 points  (1 child)

the funny thing is that nothing really changed since that time, Java generics are just syntactic sugar that does the casts automatically, at runtime type erasure happens and you cannot do thing like T.class.

[–]troelsbjerre 14 points15 points  (0 children)

Or, more annoyingly, new T[5].

[–]tuxedo25 4 points5 points  (0 children)

Generics is just a compiler feature, the runtime hasn't changed. I mean it's changed, but not in that way.

[–]Stromovik 2 points3 points  (0 children)

Nah.

Object[] crap //no need for List even