Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79761 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30328 invoked from network); 17 Dec 2014 01:28:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Dec 2014 01:28:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:63860] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/A0-25720-32CD0945 for ; Tue, 16 Dec 2014 20:28:04 -0500 Received: from [192.168.0.101] ([91.67.244.80]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Mc8Pz-1YKVZ23QjH-00JWik; Wed, 17 Dec 2014 02:27:59 +0100 Message-ID: <5490DC22.2080605@gmx.de> Date: Wed, 17 Dec 2014 02:28:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "guilhermeblanco@gmail.com" , Rowan Collins CC: Stanislav Malyshev , PHP internals References: <548FEE87.7020602@gmail.com> <549009EE.7040808@fischer.name> <54907683.2070509@gmail.com> <8AB6896C-D5DB-4471-BBD5-60784B2FC1BE@gmail.com> <54907EDE.6020500@gmail.com> <4E4F7392-154C-4282-8D5D-553194D09DCE@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Fnjv4U/yETpWTcBRFUA752oOKdSqBLT8OsAIUhpRdzcLX2TOmdg JGuFFTX8QqTFEzRiRgMw6jG7lkI1f1lt7Fsk/8++aUvvrcM24NTQbIHdDeuj1Ay8YTIbGQg Vh0n4f0ECXnishw6Wx/lTpAwgohKl0RStu/d+hVo17qLy8MHLsaV+HlFlmZmKgk3UyP2Wfc DcmArF4FUO1hNm+lvvOeg== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [PHP-DEV] [RFC][VOTE] Objects as Keys From: cmbecker69@gmx.de (Christoph Becker) guilhermeblanco@gmail.com wrote: > On Tue, Dec 16, 2014 at 9:39 AM, Matteo Beccati > wrote: > >> Are you sure you haven't misinterpreted the RFC? > > I did not. You may think I mentioned IdentityMap as entity map, but I'm > talking about entityPersister mapping or resultPointers consumptions that > happens inside Doctrine throughout the execution. Entity IdentityMap is > enough to use purely spl_object_hash(). We should focus on the main goal > here, which is complex structures as keys. > > As a very complex library developer I do see lots of use cases for this. AIUI, this RFC is meant to introduce some sugar only. Wouldn't it be possible to have object hashes without __hash(), by introducing a respective interface (maybe "Hashable" or "Identifiable") and requiring the appropriate classes to implement this interface? -- Christoph M. Becker