abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: Coding/Language Standards
Date Thu, 28 Sep 2006 16:04:53 GMT
On 9/28/06, Harris Boyce III <harris.r.boyce.iii@gmail.com> wrote:
> OK, so why would I do that?  Why would I make the list returned from
> List<?> getEntries() immutable and provide mutator methods when the
> List<?> type supports them implicitly?
> Again, sorry if this seems like a college-level discussion, but I do
> struggle with this bit of encapsulation.

Aside from what James said about our current implementation, I could
also see you wanting to have sanity checking on the entries, for
example if there's no feed level author then authors are required on
entries.  If you can just insert an arbitrary entry into the list you
wouldn't have a chance to sanity check it.

Not saying we do that now (I have no idea), but it's one reason to
keep mutations to the underlying data structure under the control of
Abdera's code, not the list implementation.


View raw message