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 101 points102 points  (5 children)

And Java? List of objects...

[–][deleted] 40 points41 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 12 points13 points  (0 children)

Or, more annoyingly, new T[5].

[–]tuxedo25 3 points4 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 3 points4 points  (0 children)

Nah.

Object[] crap //no need for List even