Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 185 invoked from network); 27 Oct 2014 06:36:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2014 06:36:52 -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.47 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.47 mail-pa0-f47.google.com Received: from [209.85.220.47] ([209.85.220.47:35700] helo=mail-pa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/66-56216-308ED445 for ; Mon, 27 Oct 2014 01:36:52 -0500 Received: by mail-pa0-f47.google.com with SMTP id kx10so4834124pab.20 for ; Sun, 26 Oct 2014 23:36:49 -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=bfiCov7VZRVd9RxWMnAF9o8I/oJKlFJ2/yX0NEyPwr8=; b=G/7vX34RZbaR5yR3vpYdtuR4Rh1dVeEiL2gSyuyGpnHL57IlSg+72/lf6OfKvfN27a yqZwpu/c0yOE3IBs1XSn3QiFbcvYp2wDWMZkWcFPnVoHUp3Snj+NwJx3Tk6gjDpZFZ5+ jZJfbrN6+PvY5JnGZC6fwV3jpyxPbXLXP6nJx/u+8a5iTSQHq9EPWstxdclU8+R796Ui FdnVl8pXEr7ZzGryHqgu8Yar5kezQn0B4cdWH1BHnp6l5chAN1Bhef3O8uP51V95+5qr eK+fhklsVCaSCrhOPGT9lSpjnTw7xxdHnqqfSFUi6WMqzmkxfhIPnfwVLIMw4TIcR2LT b+PQ== X-Received: by 10.68.166.130 with SMTP id zg2mr21768948pbb.87.1414391809024; Sun, 26 Oct 2014 23:36:49 -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 t11sm9855042pdj.89.2014.10.26.23.36.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Oct 2014 23:36:48 -0700 (PDT) Message-ID: <544DE7FF.6030809@gmail.com> Date: Sun, 26 Oct 2014 23:36:47 -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: Joe Watkins CC: PHP Internals References: <544DA1CD.9070109@php.net> <1414388245.2624.135.camel@localhost.localdomain> In-Reply-To: <1414388245.2624.135.camel@localhost.localdomain> 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! > It seems __toScalar might be a good name, this is what the method > actually does, the engine then coerces to a type suitable for use as a > key, but you can return a double. It might be more forward thinking > therefore to use the name __toScalar, while today we'd only be using > it for this, __toScalar does not express the fact why we are calling it - to use it as a key. It's not just a scalar conversion, it's conversion for the purpose of hashing.