Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Generics - good, bad or indifferent?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Chris Uppal, post: 633583"] That's my opinion. The benefits gained are two-fold. We significantly reduce (but not eliminate) the risk of casting errors. We gain better self-documentation of the code. The first of these is (IMO) completely negligible. It just wasn't worth the effort. It doesn't even justify the small effort of typing in the <>s. Let alone the massive complications to the javac implementation; to the java specification (which is now essentially unreadable, while it /used/ to be a valuable resource); and to all Java-aware tools such as Eclipse. (Just think what valuable improvements to Eclipse we are missing because the programmers' time was spent on the changes needed to support generics -- and God knows, Eclipse could do with a bit of improvement...) The second is (IMO) a lot more valuable. Certainly I'd rather know that some method answers a List<Point> than just a List. However, when you factor in the "wildcard" notation, the generic type definitions quickly become unreadable. And, in my limited experience, so far, that happens more often than not. So you end up ignoring the spec, and assuming that it's "correct" and does in fact mean what logic and experience suggest it /should/ mean. So the documentary value is compromised. I think they blew it. -- chris [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Generics - good, bad or indifferent?
Top