John Nilsson wrote: > On Wed, Mar 4, 2009 at 4:40 PM, Reinier Zwitserloot <[email protected]> > wrote: > >> List should have just had lookup and 'make a copy of self' methods. >> Then, MutableList, which extends it, should have had the add, addAll, >> remove, removeAll, clear, and other mutating methods on them. >> > > So a MutableList can be passed as a List which is supposed to be immutable? > Who said List would imply immutable? If Java would actually support a notion of immutability, then there should be List with two subtypes "MutableList" and "ImmutableList". Just like Collection does guarantee neither set nor bag semantics, the List Reinier is talking about would guarantee neither mutability nor immutability. The lack of specification means abstraction, not opposition.
Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
