Sorry, I meant to simplify the remove call, but you get the idea. -- Kevin
On Wed, Nov 11, 2009 at 10:44 AM, Kevin Menard <[email protected]> wrote: > > The "problem" exists outside the context of an iterator, too. What > would you expect the semantics to be of the following? > > foo.allBars.remove(for.allBars.get(0)); > > Should it just modify the in-memory list or should it represent the > backing DB and represent a DELETE operation? > > It gets a little worse when you add your own custom collection methods > (i.e., not DB backed) and it's not clear what type you're working > with. > > Don't get me wrong, it's wholly a human problem. But, false > expectations can lead to tedious debugging sessions and adoptions of > seemingly tenuous programming habits. > > -- > Kevin >
