Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29879 invoked from network); 30 Oct 2014 23:11:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2014 23:11:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=willfitch@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=willfitch@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 66.111.4.27 as permitted sender) X-PHP-List-Original-Sender: willfitch@php.net X-Host-Fingerprint: 66.111.4.27 out3-smtp.messagingengine.com Received: from [66.111.4.27] ([66.111.4.27:39000] helo=out3-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/12-17925-785C2545 for ; Thu, 30 Oct 2014 18:11:03 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A29B520D9B for ; Thu, 30 Oct 2014 19:11:00 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Thu, 30 Oct 2014 19:11:00 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:content-type:mime-version :subject:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; s=smtpout; bh=fndrmHzStzOBBQ2Sui4ErX9 F/0g=; b=ebKX/3hYBp7/gC3cSQeNHVQyOSMkKXlRsOPtBD1cMvFFydYaQXywk0K RcrU5G4ZIa3fzaS4WHX+4mu3r0dA9Mr6AUm/TnP51IOOtjdc6k4NQqyyveBk1JhS un4Egee3vXWJZoxB12fg+LYmmgjyirzEAx7/UhL53W8bEgrwgRDU= X-Sasl-enc: XxhFDKhOpu4SrcW4Bk1l81dCWvvlXdW967JyUsZnWEbf 1414710660 Received: from [192.168.1.137] (unknown [24.183.225.156]) by mail.messagingengine.com (Postfix) with ESMTPA id 31A7268010D; Thu, 30 Oct 2014 19:11:00 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <764EEA11-4AA9-4E57-B7FB-BA926D4DB32A@ajf.me> Date: Thu, 30 Oct 2014 18:10:59 -0500 Cc: Stas Malyshev , Larry Garfield , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <544DA1CD.9070109@php.net> <4ED7146272E04A47B986ED49E771E347BD7E35E061@Ikarus.ameusgmbh.intern> <51CF9ADE-2E04-4BC0-9E5C-B93498251F59@php.net> <54527E7E.2020505@garfieldtech.com> <54528445.8080604@sugarcrm.com> <69356D8D-44FB-411F-907D-94B61D4A472A@fastmail.fm> <764EEA11-4AA9-4E57-B7FB-BA926D4DB32A@ajf.me> To: Andrea Faulds X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC] Using objects as keys From: willfitch@php.net (Will Fitch) > On Oct 30, 2014, at 3:28 PM, Andrea Faulds wrote: >=20 >=20 >> On 30 Oct 2014, at 19:51, Will Fitch wrote: >>=20 >> My only concern at this point is the default value of the hash. If we = were to use spl _object_hash, we could be setting a precedence that a = hash must be unique to each object. >=20 > In addition to what Stas says above, well, not all objects work like = that. What if I want objects to hash by value, not by identity? Don=E2=80=99= t force the identity model. I=E2=80=99m not suggesting we force anything. The tone of the = conversation earlier referred to using spl_object_hash as a default. If = we don=E2=80=99t do this, that=E2=80=99s totally fine. We don=E2=80=99t have an =E2=80=9C__equals=E2=80=9D equivalent to = Java=E2=80=99s equals(). While I understand the intent of this RFC is = not to address that, perhaps it should be considered in the future. > -- > Andrea Faulds > http://ajf.me/ >=20 >=20 >=20 >=20