On 09/12/2016 09:40 AM, Matthew Weier O'Phinney wrote:
On Mon, Sep 12, 2016 at 1:04 AM, Andreas Heigl <andr...@heigl.org> wrote:
I have two things I'd like to mention regarding PSR-13:
First, for me personally it makes less sense to have a
LinkCollectionInterface that doesn't act like I'D expect a Collection to
work. For me a collection is a set of similar items I can then iterate over.
Whether that's a collection of links, headers, or teapots doesn't matter. So
I'd expect an object implementing a CollectionInterface to be iterable and
to already contain the items in question. The current implementation of the
LinkCollectionInterface though looks more like a CollectorInterface.
Something that collects linkInterfaces and can return a
LinkCollectionInterface. I know it's only a slight difference in wording,
but for me it would make a difference in understanding what happens.
Thanks for this feedback! Until recently, I didn't typically think of
collections as requiring iteration, but considering that the
terminology has definitely been moving in that direction the last few
years (google for "first-class collection", and you'll see fairly
consistent definitions!), it may make sense to change the name. I'll
discuss with Larry today.
Matthew and I brainstormed a bit more. The only other word we could
come up with that we didn't hate even more than "Collection" was
"Catalog". Which would then result in:
class Whatever implements LinkCatalogInterface {
}
How do people feel about that? Is it more/less descriptive than
Collection? More/less pompous sounding? :-) A few seconds of Googling
didn't find any existing CS definition of "catalog" that would conflict
with it, FWIW.
We went over the name before and Collection was the best we came up
with. So I think it's Collection or Catalog at the end of the day.
--Larry Garfield
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/7157fa8b-51b7-f629-7fd5-3403742d2450%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.