On 7/13/06, Garrett Rooney <[EMAIL PROTECTED]> wrote:
On 7/13/06, James M Snell <[EMAIL PROTECTED]> wrote:
> There are a number of aspects of the model api that have been bugging me
> for some time.
>
> For instance,
>
> Feed.getEntries() returns a List, however, Feed.getEntries().add(...)
> doesn't actually do anything.  It makes more sense for Feed.getEntries()
> to return an Iterator given that it's primary purpose is iterating
> through the entries.  Doing so also allows us to optimize the underlying
>  Axiom code (which provides efficient element iterators).

 Returning an Iterator at least makes it clear
that there was no deep copy type semantics going on.

FWIW, the Java convention is to use a List. See
Collections.unmodifiableList(), etc.

--

Robert Sayre

"I would have written a shorter letter, but I did not have the time."

Reply via email to