Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45142 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64550 invoked from network); 30 Jul 2009 14:10:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2009 14:10:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.220 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.220.220 mail-fx0-f220.google.com Received: from [209.85.220.220] ([209.85.220.220:41309] helo=mail-fx0-f220.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/1D-03589-7C9A17A4 for ; Thu, 30 Jul 2009 10:10:16 -0400 Received: by fxm20 with SMTP id 20so704578fxm.24 for ; Thu, 30 Jul 2009 07:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gSGO5HABzz5TOHGy/kR6VDRlJLYEeBvoTY7FxqHPGRE=; b=CUpnL196NrBTLksF/Jq1DIC5xBJ/ATdPas0bs9wmKTyjgZJTECDNQlzRDUs2y82iR/ YkdhLE+q0Z/R225154MBY4TqerxItucJvU84lLUoH8nxLcWggm0q6rh2gj5E44oK1qxv WdMant91tmpDw3+72TGb+qaO973DrfIuh8TkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qMkqLKGH19ni23tbNjEWX9pFo7CoTlIJFb35nVQf45YFyhjcrGemx1sUNM2U7GeMow aH17pBnyYFyaFvZ9G4BqUljuU48T2/oaJcCL6kv7Y8BwnyLPuD5rzhRd8CZuBna1eqEU 0h15ewzX2MLtnzYVoUGSvBjpvlGAzAnqgUqSU= MIME-Version: 1.0 Received: by 10.239.141.74 with SMTP id b10mr115031hba.84.1248963012517; Thu, 30 Jul 2009 07:10:12 -0700 (PDT) In-Reply-To: <1248962475.4159.14.camel@goldfinger.johannes.nop> References: <1248962475.4159.14.camel@goldfinger.johannes.nop> Date: Thu, 30 Jul 2009 18:10:12 +0400 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Guilherme Blanco , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Supporting ArrayObject in array_* functions From: indeyets@gmail.com (Alexey Zakhlestin) 2009/7/30 Johannes Schl=C3=BCter : > 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. --=20 Alexey Zakhlestin http://www.milkfarmsoft.com/ Sent from St Petersburg, Russian Federation