Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78230 invoked from network); 2 Jul 2014 16:25:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2014 16:25:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.45 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.45 mail-oa0-f45.google.com Received: from [209.85.219.45] ([209.85.219.45:35186] helo=mail-oa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/A6-47713-87234B35 for ; Wed, 02 Jul 2014 12:25:29 -0400 Received: by mail-oa0-f45.google.com with SMTP id o6so12698710oag.32 for ; Wed, 02 Jul 2014 09:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lo7Vh2EsAWjdkdEwlWkefiPs24MSQQRlICB6r70FHw8=; b=K5IIZTYsGOOVIWHGeReTacxqsmm1ub+a7Xp0VZaHiLROrYvYsfhTamoF8oBFA5ifmC t1QxViadL6Hhe3ctsFDRhEryYS+IVidOTDi8vzk5EVb7JEJOiHh9xXyMidXvj+cdM5fl p+utnI7QUkp/iC3ktRudLWimM3Kh5eQu7OZJvHvvrQ9/U0pMD28wWx1grMEgC7seRwwj uhTs8MNX0cZJlaKVbi1r/XtJAJM4tDLWHu0E1C36WkTJJRLiYzzggXrA0Vs5GEP8PH3s CWmc+uyI23o9s22VKqF9BFOiU9D/A49bs0msemllNPyK+U0nxgGJrWh3oJPxxJud1pBq Acyw== MIME-Version: 1.0 X-Received: by 10.60.155.231 with SMTP id vz7mr59810296oeb.56.1404318325985; Wed, 02 Jul 2014 09:25:25 -0700 (PDT) Received: by 10.182.59.45 with HTTP; Wed, 2 Jul 2014 09:25:25 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Jul 2014 18:25:25 +0200 Message-ID: To: Lazare Inepologlou Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7bd7668ef92de904fd38567b Subject: Re: [PHP-DEV] Re: [RFC] [PHP 6] Uniform Variable Syntax From: nikita.ppv@gmail.com (Nikita Popov) --047d7bd7668ef92de904fd38567b Content-Type: text/plain; charset=UTF-8 On Wed, Jul 2, 2014 at 6:04 PM, Lazare Inepologlou wrote: > > 2014-07-02 17:51 GMT+02:00 Nikita Popov : > > On Mon, Jun 9, 2014 at 3:33 PM, Nikita Popov wrote: >> >> > Hi internals! >> > >> > I have created a proposal for a more consistent and complete variable >> > syntax for PHP 6: >> > >> > https://wiki.php.net/rfc/uniform_variable_syntax >> > >> > The RFC is targeted at PHP 6 because it breaks compatibility for some >> > rarely used variable-variable constructs. >> > >> >> Any more feedback on this? Otherwise I'll start the vote sometime soon :) >> >> > Yes, in the RFC, you mention that this will be possible: > > ($obj->closure)() > > While this is very welcome, I was wandering if we could skip the extra > parenthesis, like this: > > $obj->closure() > We could skip the extra parenthesis, but that would require changing the meaning of method calls. This discussion turns up every now and then, one of the more recent ones being http://markmail.org/message/3zi53txadno6xrqa. A key problem was always that supporting this would break BC. However that BC break may be acceptable for PHP 6, so the it might be worthwhile to reconsider the previous decisions regarding this issue. However this is not related to variable syntax (it is a question of method lookup semantics), so I would suggest opening a new discussion thread for this (and/or write an RFC for it). > Likewise, this would also be nice: > > new ClassName->foo() > This is problematic because the following would be ambiguous: new $className->foo() // could be (_current_ behavior) new ($className->foo)() // or (new $className)->foo() Of course we could resolve the ambiguity (towards the _latter_ interpretation) or special-case the plain-classname case. Both options do not seem very appealing to me. Imho it's better to keep the explicit syntax. Nikita --047d7bd7668ef92de904fd38567b--