Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75171 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84764 invoked from network); 2 Jul 2014 17:58:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2014 17:58:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=rl@nbsp.io; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rl@nbsp.io; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nbsp.io from 209.85.213.170 cause and error) X-PHP-List-Original-Sender: rl@nbsp.io X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:36359] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/A7-47713-75844B35 for ; Wed, 02 Jul 2014 13:58:47 -0400 Received: by mail-ig0-f170.google.com with SMTP id h15so6731171igd.1 for ; Wed, 02 Jul 2014 10:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ThIltKCoYutg5QNOOTZ1/47QCqrNh6OdCbwWHh2JZwo=; b=QtxijPPl9laBJS8tfNaRQjUqqro5699I+hPVBE/pRsv1Pe2SsOmouzVBa8gdyYxMz6 VPqaFwY0yDM+dCJdFhq2JiN7wb5Fn5NdrJtA/hLZG+p07vaaYhuNXpVWrBKmFEhyhhfE TtKeqPHl04UXkt8TcAHaFAH7ibb8Apo5Szm6t8ReyTnhn5amlnP41Emk3Jnrs635c4S9 D2j+YaQ6oqOqo7XWztcyI6JqxOnofT9hCVX9LREGohu/YSsdhJJ2XCeQQl6UWT1mIJY5 UFlGNxjt7+7dAejAdK40Bn2cvnDHXx5MO/W1Yx65E7ftzQeu7euByNAFVZJg8IbMxlxp gTiQ== X-Gm-Message-State: ALoCoQksDdhnosUyWElPpaSj1CoP3Jtl56ikYU4URhOA4WPqQWqHR6/lBLYNHX6mBl7GDCBziOTu MIME-Version: 1.0 X-Received: by 10.43.137.74 with SMTP id in10mr5501025icc.54.1404323924503; Wed, 02 Jul 2014 10:58:44 -0700 (PDT) Received: by 10.50.231.180 with HTTP; Wed, 2 Jul 2014 10:58:44 -0700 (PDT) X-Originating-IP: [84.232.233.75] In-Reply-To: References: Date: Wed, 2 Jul 2014 20:58:44 +0300 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c20eb8ab7f3504fd39a424 Subject: Re: [PHP-DEV] Re: [RFC] [PHP 6] Uniform Variable Syntax From: rl@nbsp.io (Rowan Lewis) --001a11c20eb8ab7f3504fd39a424 Content-Type: text/plain; charset=UTF-8 How would you create a new callable object and then invoke it? Since 'nested' () is now supported: new MagicInvoke()(); Could be the same as: (new MagicInvoke())(); On Wed, Jul 2, 2014 at 7:25 PM, Nikita Popov wrote: > 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 > --001a11c20eb8ab7f3504fd39a424--