Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64348 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98633 invoked from network); 18 Dec 2012 18:46:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2012 18:46:36 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.182 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.220.182 mail-vc0-f182.google.com Received: from [209.85.220.182] ([209.85.220.182:48770] helo=mail-vc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/7C-33799-B0AB0D05 for ; Tue, 18 Dec 2012 13:46:36 -0500 Received: by mail-vc0-f182.google.com with SMTP id fy27so1298495vcb.13 for ; Tue, 18 Dec 2012 10:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k8r7+wSDQIF6+hyvhrLRlWWn5p/p+8BF351FeKtS+DQ=; b=Bf9nyplKVbu9k5Yvpk3v8vBinjjxM4gdwudjzFtDAOtWOKsyqBbnt9Sy01IuotzZOE pmsoFJyyZlhBscqD+LuhtDJMaNvKWkVqZkgahSlSGmByUY729RekAaYCsC5RhmMaHAKu pfsefWz9YCPxlOjcqBK+f4vGEVb/T+NvmYKfDuuXczXI9GxTEFq4xoH7Ne9WEnkETE9t OzAd/Ldwy57Ebox7uw2aHuX7PLp/QbR6iEFqEYbtnseXGRYGFeEX7gH/B8N5A+la0YQl rLOtMgHHmOjA6DvXQZzAJg8ZeGdA8PoOa6mmsA2YmyWaw1V0GsMtbsYaSX4nbNd7Di6r gjWg== MIME-Version: 1.0 Received: by 10.58.137.7 with SMTP id qe7mr4842971veb.23.1355856392616; Tue, 18 Dec 2012 10:46:32 -0800 (PST) Received: by 10.58.200.130 with HTTP; Tue, 18 Dec 2012 10:46:32 -0800 (PST) In-Reply-To: <50D0B953.8010001@suumit.com> References: <50D08108.1020503@suumit.com> <50D0B162.90006@gmail.com> <50D0B953.8010001@suumit.com> Date: Tue, 18 Dec 2012 13:46:32 -0500 Message-ID: To: victor@suumit.com Cc: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b5da809a5fc1204d124ead4 Subject: Re: [PHP-DEV] How about implementing more data structures (ie Map, Set) From: ircmaxell@gmail.com (Anthony Ferrara) --047d7b5da809a5fc1204d124ead4 Content-Type: text/plain; charset=ISO-8859-1 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... --047d7b5da809a5fc1204d124ead4--