Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 478 invoked from network); 18 Dec 2012 18:53:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2012 18:53:53 -0000 Authentication-Results: pb1.pair.com header.from=victor@suumit.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=victor@suumit.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain suumit.com from 72.30.239.149 cause and error) X-PHP-List-Original-Sender: victor@suumit.com X-Host-Fingerprint: 72.30.239.149 nm39-vm5.bullet.mail.bf1.yahoo.com Received: from [72.30.239.149] ([72.30.239.149:31211] helo=nm39-vm5.bullet.mail.bf1.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/DC-33799-0CBB0D05 for ; Tue, 18 Dec 2012 13:53:53 -0500 Received: from [98.139.212.145] by nm39.bullet.mail.bf1.yahoo.com with NNFMP; 18 Dec 2012 18:53:49 -0000 Received: from [76.13.13.40] by tm2.bullet.mail.bf1.yahoo.com with NNFMP; 18 Dec 2012 18:53:49 -0000 Received: from [127.0.0.1] by smtp101.prem.mail.ac4.yahoo.com with NNFMP; 18 Dec 2012 18:53:49 -0000 X-Yahoo-Newman-Id: 422710.36965.bm@smtp101.prem.mail.ac4.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: LndcLzgVM1mDN.niVRxrMNeBSKm2mTecOgvcC1rQitdWlfo ohZHVvKTZLJCaXvDAYdVW616ScElpF64QxfPQTr5WMylvP8nsa0Sj3wpGmXJ i2zKftVK7kFtQmkY3PR0o7hR48aeY3w11JGky.1FPF.6XOTD7_FxmHgfAzPo ZKdETrXLHPfipY2AqIS9_pgr1KFlejgVqgr1ZRcjEjX3FeyuOacVRr1hpuZ1 c7CWiPsA4Mg7sWRVfUaiPNzKo5tYxzgIvt8eeFL8TPUIHm5z1ttSsZdrlFyM h9uphNTV3nB96NppIjXR4vlAO0RzgtYPaLe8yvpgfNUXNiABTvQTO8efzasT YVRsGGmBwYBIAUkaqmrFFjXBCz9tKcZ9p4RSRKUQW70Vs9C3pcFMf0OtqY1X dC2K3FyZ_95jHq8G4ixq5.c_xzJJ9AfCfmMMBc6pwNQy3agt8uhllUjCfxm8 cQfPJhRv9VzfqBZVq2UganRdiJ5U- X-Yahoo-SMTP: JD6O2cuswBAWdaVT1ffr98ATm3fQ3wF_ou8N Received: from [192.168.0.10] (victor@82.236.98.234 with plain) by smtp101.prem.mail.ac4.yahoo.com with SMTP; 18 Dec 2012 10:53:49 -0800 PST Message-ID: <50D0BBBC.5050000@suumit.com> Date: Tue, 18 Dec 2012 19:53:48 +0100 Reply-To: victor@suumit.com Organization: Suumit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Anthony Ferrara CC: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= , "internals@lists.php.net" References: <50D08108.1020503@suumit.com> <50D0B162.90006@gmail.com> <50D0B953.8010001@suumit.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030102080700080504060105" Subject: Re: [PHP-DEV] How about implementing more data structures (ie Map, Set) From: victor@suumit.com (Victor Berchet) --------------030102080700080504060105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 12/18/2012 07:46 PM, Anthony Ferrara wrote: > Victor, > > > If you give a closer look to my example, you will notice a > difference: $map[$setA] and $map[$setB] point to the same storage > which I think is not possible with SPLObjectStorage. > > Well, how could you do that? Without implementing object comparison > methods at least (which is outside the scope of this discussion)? I > could see a type-specific map which knows how to compare the classes, > but in general you'd need to defer comparison to the objects > themselves (so $obj1 == $obj2 would fire $obj1->compareTo($obj2) === 0)... > > Unless I've got something confused... Well let's say that object comparison methods (interface) is part of the details that I owe to this thread. --------------030102080700080504060105--