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.

johannes



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to