Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38078 invoked from network); 17 Dec 2014 02:04:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Dec 2014 02:04:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.54 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.218.54 mail-oi0-f54.google.com Received: from [209.85.218.54] ([209.85.218.54:33227] helo=mail-oi0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/32-25720-AA4E0945 for ; Tue, 16 Dec 2014 21:04:27 -0500 Received: by mail-oi0-f54.google.com with SMTP id u20so10478679oif.13 for ; Tue, 16 Dec 2014 18:04:24 -0800 (PST) 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=hIqDclrMRDSGKdNTH1YcsW5tO8Iu6z+z7oGqpxctV7c=; b=eQMZoWH5Aq+pDgNw3qmqGKfk9/1Re5GvrAhSPGKqPN9tNOxmnN1MYE5MZqmTiv3SF6 q7ahkCe/rw2d0I4toPwebRom9YsbXTDiNmq0bXjw/noGYOSGvbe7zFzM5SxoeJ2AG56P hekst0EX8wt7VS9WZ2FcUIlzvNrJHK9YY4/P5/3duwGVPdHWKjy/s00Ee8m31VgC57NN lEf+onEhNcuE7cNFmTdpttpEgXB7ZXOtEXQSF0lSvUEv1czngBDEpsH6UBQCZonQeSES Cv83imaGqn2Okiav9plFMvvQcpOAvGbeQHuWEWUe3IbW3WL4avnz9OIZT+kD1NdbAU9I xmgA== X-Received: by 10.202.91.87 with SMTP id p84mr23235626oib.0.1418781864112; Tue, 16 Dec 2014 18:04:24 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id a139sm739434oih.6.2014.12.16.18.04.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 18:04:23 -0800 (PST) Message-ID: <5490E4A5.9080901@gmail.com> Date: Tue, 16 Dec 2014 18:04:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andrea Faulds CC: Christoph Becker , "guilhermeblanco@gmail.com" , Rowan Collins , 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> <5490DC22.2080605@gmx.de> <5490DD19.2080502@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC][VOTE] Objects as Keys From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >> On 17 Dec 2014, at 01:32, Stanislav Malyshev >> wrote: >> >> Hi! >> >>> AIUI, this RFC is meant to introduce some sugar only. Wouldn't >>> it be >> >> I'm not sure what you mean by "some sugar only". It introduces the >> capability of using objects in array key context, which was not >> available until now. > > That’s not true: the RFC doesn’t allow objects to be keys, And reading what I actually wrote would reveal that I did not write "allow objects to be keys", I wrote "using objects in array key context", and this is of course true. Please do read what you calling "not true" before doing it. I explained it numerous times, I even wrote a special blog post explaining it, I referenced it here, but it as if nobody is actually reading anything before repeating the same arguments. > it just adds implicit conversion. This is just sugar for an explicit > conversion to int or string. And this is completely false. While the result of the function must be int or string, saying any function that returns int or string is "just sugar for an explicit conversion to int or string" is false. This function has its separate purpose which does not equal converting to any specific type, but is suited for its unique context. You _can_ have it return the same result as (int) or (string) but you don't have to. -- Stas Malyshev smalyshev@gmail.com