The Artima Developer Community
Sponsored Link

Weblogs Forum
Simplyfing Java Generics by Eliminating Wildcards

33 replies on 3 pages. Most recent reply: Jul 19, 2008 10:16 PM by Howard Lovatt

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 33 replies on 3 pages [ « | 1 2 3 ]
Fred Garvin

Posts: 52
Nickname: fredgarvin
Registered: Jan, 2008

Re: Simplyfing Java Generics by Eliminating Wildcards Posted: Mar 4, 2008 1:23 AM
Reply to this message Reply
Advertisement
Howard,

I'm open to a better solution too, so long as it doesn't involve a new language feature; there aren't enough practical use cases to justify one, IMO.

You know I think that's what's wrong with Java's recent course of evolution -- it violates the 80/20 rule. It seems that with Neal Gafter and crew behind the wheel we find ourselves with a mix of ill-conceived features catering to corner cases at the expense of overall usability.

The BGGA closure proposal is the most recent example of this (Gafter is one of the Gs). Here's an example of the "thought" process behind the madness.
http://gafter.blogspot.com/2006/10/iterative-control-abstraction-user.html
Note Bloch's attempts at introducing reason and Gafter's irrational take. You can lead a horse to water...

Howard Lovatt

Posts: 321
Nickname: hlovatt
Registered: Mar, 2003

Re: Simplyfing Java Generics by Eliminating Wildcards Posted: Mar 4, 2008 6:29 PM
Reply to this message Reply
Hi Fred,

Well said!

Liam Knox

Posts: 1
Nickname: kinko
Registered: Jul, 2008

Re: Simplyfing Java Generics by Eliminating Wildcards Posted: Jul 17, 2008 10:19 PM
Reply to this message Reply
I totally disagree with this premis. If your method of enforcing compile checks is so complicated that by doing so you are likely to make errors, then this invalidates the whole process. Also generic wildcards make the code so unwieldly and harder to read. One of the key points about code maintainabilty is simplicity and readability. If these are compromized also, what you gain from the compiler checks are neggated. The compiler can only save you from so much, it cant make your code bug proof

Howard Lovatt

Posts: 321
Nickname: hlovatt
Registered: Mar, 2003

Re: Simplyfing Java Generics by Eliminating Wildcards Posted: Jul 19, 2008 10:16 PM
Reply to this message Reply
Liam, Totally agree. You need to balance cost and benefit, not just assume that any benefit no matter how small is worth any cost no matter how large.

Flat View: This topic has 33 replies on 3 pages [ « | 1  2  3 ]
Topic: Object Adapter based on Dynamic Proxy Previous Topic   Next Topic Topic: The Simplest Thing That Could Possibly Work?


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us