2009/7/30 Alexey Zakhlestin <indey...@gmail.com>

> 2009/7/30 Johannes Schlüter <johan...@schlueters.de>:
> > On Thu, 2009-07-30 at 00:08 -0300, Guilherme Blanco wrote:
> >> What do you think about the possibility to support ArrayObject
> >> instances in array_* functions?
> >> If you all agreed on this, I can definately help to complete the
> >> patch, but I need some initial guidance to finish at least the first
> >> function.
> >
> > In general I'm for bringing Iterators/ArrayObject/.. on a line with
> > arrays but please don't simply patch some functions but let's try to
> > find a as consistent as possible global solution.
> >
> > Questions included there are of these kinds (just examples)
> > - is that specific to ArrayObject or do we "need" interfaces like
> >  "Sortable" or "Shuffable"
> > - What should stuff like aray_merge(ArrayObject, array) do
> > - Should we do this globally? (should ldap_set_option()
> >  allow an ArrayObject as 3rd param?)
> >
> > Especially the latter shows that a proper solution might be not to patch
> > individual functions but to introduce some form of abstraction from
> > HashTables for "array operations" and then use that interface.
> >
> > Simply extending a few functions will end in a mess but looking around
> > people seem to love these structures so improving them is good.
>
> agreed.
> the proper solution would be to define several interfaces, make
> functions accept objects of these interfaces and then add some
> "hacks", which would pretend, that array() implements these.
>

I would vote to extend this concept to user-land functions as well if at all
possible.  It would make my life easier to not care about the implementation
of a set of data so long as it conformed to an interface.

-- 
-Nathan Gordon

If the database server goes down and there is no code to hear it, does it
really go down?
<esc>:wq<CR>

Reply via email to