Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78398 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77484 invoked from network); 27 Oct 2014 18:11:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2014 18:11:54 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.48 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.48 mail-pa0-f48.google.com Received: from [209.85.220.48] ([209.85.220.48:51283] helo=mail-pa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/14-56216-9EA8E445 for ; Mon, 27 Oct 2014 13:11:53 -0500 Received: by mail-pa0-f48.google.com with SMTP id ey11so5963530pad.21 for ; Mon, 27 Oct 2014 11:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=QIEoLIr+YudX7IKT3v+4X2YGE3xyPmDj/Me8J5DZo4I=; b=GiEM8goCkkxUmS6dS/Qp6K0XS1HNPvxbKpHaa2YTimoKijWPvo5PZmho4M+qdpKgHT CSutnT307s2j9ILw9KghHi0fWB5oVxFrbtCjT5/U9rTMBxWISw4wFBvvMhUL3wAV5JQy X9UXd4e2005qe5fGj3sJM5GrzDr54LKxXQl/ZmkB+uk9Zwedq1H3i0IRlFb5K1/ZeYFM AuzNQCj9vpWla0SkKQXXMgS+WSceo8ZBTHNYsM87gXNd4mXund0jIOxhV1tGItHb0qxc 9ZL+rhlYNmvqGq7CJGvNpQrbS63HmBGdiGB7bSjxGWJu90/s2yHhUsXCBACJGlgdW7HA sccg== X-Received: by 10.70.127.239 with SMTP id nj15mr11822543pdb.125.1414433510331; Mon, 27 Oct 2014 11:11:50 -0700 (PDT) Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id od12sm11456171pdb.96.2014.10.27.11.11.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 11:11:49 -0700 (PDT) Message-ID: <544E8AE4.3040907@gmail.com> Date: Mon, 27 Oct 2014 11:11:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Etienne Kneuss CC: PHP Internals References: <544DA1CD.9070109@php.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Using objects as keys From: smalyshev@gmail.com (Stas Malyshev) Hi! > As others noted, it also prevents a full-fledged objects-as-key > implementation in the future. You do realize to have such implementation we'd need to rewrite our hash layer completely and also introduce the concept of immutable object, otherwise changing the object would make the hash completely broken? Which means it would probably never happen unless PHP engine is radically rewritten. > > In the end it causes issues and brings very little compared to an > explicit call to convert an object to a key. Same as __toString obviously is useless as you could just call a method explicitly.