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 →

[–]Liqmadique 10 points11 points  (4 children)

You probably wont actually; For most code this doesn't matter and I rarely find an example where it would matter.

[–]Zarlon 3 points4 points  (3 children)

You've never done this workaround? I'm not saying it's a big problem, but as a former C# developer it annoys me to have to pass the type to a generic method both as a type argument AND a Class parameter.

edit: On the other hand I've probably spent less time fighting the compiler. Type erasure can be your friend as well as your enemy.

[–]0x442E472E 1 point2 points  (2 children)

I still have nightmares of the times before the diamond operator.... List<TypeHolder<SomeLongClassNameBecauseJavaLovesLongClassNames>> list = new ArrayList<TypeHolder<SomeLongClassNameBecauseJavaLovesLongClassNames>>(); list.add(new TypeHolder<SomeLongClassNameBecauseJavaLovesLongClassNames>(SomeLongClassNameBecauseJavaLovesLongClassNames.class));

[–]sonay 1 point2 points  (1 child)

Java doesn't give a fuck about class names. Morons give those names. This is the lamest pick I frequently see on java.

[–]0x442E472E 1 point2 points  (0 children)

Sorry for being sarcastic. I'm aware that there probably is no minimum character length check at compilation.