I think this is an important insight for any attempt to build a faster, lighter-weight collections library. The JRE collections design has been a problem for a lot of reasons, this certainly among them. It's probably unrealistic for us to simply break the behavior of any class implementing Map (for example), but we definitely *can* design a map interface that doesn't have these ugly warts in it.
On Fri, Jun 5, 2009 at 1:53 PM, Scott Blum <sco...@google.com> wrote: > Sorry, lemme clarify. I mean that maybe, just maybe, there's a correct > formulation of the library code such that some work can be optimized out > when the return value is not used. > > > On Fri, Jun 5, 2009 at 1:50 PM, John Tamplin <j...@google.com> wrote: > >> On Fri, Jun 5, 2009 at 1:21 PM, Scott Blum <sco...@google.com> wrote: >> >>> This would definitely be a good thing to look into, but I expect it's >>> slightly tricky. Maybe the library code itself could be hacked on until a >>> suitable formulation was found. >> >> >> Since the JRE requires returning the values (a very bad idea IMHO) then I >> don't see how we can short circuit it in the library. >> >> -- >> John A. Tamplin >> Software Engineer (GWT), Google >> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---