Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103798 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10717 invoked from network); 23 Jan 2019 17:52:55 -0000 Received: from unknown (HELO relay.alfa-bank.com) (217.12.96.18) by pb1.pair.com with SMTP; 23 Jan 2019 17:52:55 -0000 Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 9778BF2069; Wed, 23 Jan 2019 17:30:48 +0300 (+03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alfabank.ru; s=mainstream; t=1548253848; bh=BRBV4FzzDqEJ3rc3vFTiO7qRZLY4WMA2FqBWaf/aTfM=; h=To:From:Date; b=CQRUY4rx/pzNl5xX6dXhoAqr9hCOMtumOvqgmFRku/8SVESK1Qvl+rMIsuIraqFan 5x83DmokEy3bo9BSVyWKrHdvLAmC8fkS7CqBt6xlKfxyTbdisl+LBhiHSp9FKtGhmU XXLtHDmFWpJA25O6E9w487kIUp/aJ3zf/rojRYjk= Received: from relay.alfa-bank.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39B38F20A7 for ; Wed, 23 Jan 2019 17:30:39 +0300 (+03) Received: from SMTP1.alfaintra.net (unknown [172.28.1.129]) by relay.alfa-bank.com (Postfix) with ESMTP for ; Wed, 23 Jan 2019 17:30:39 +0300 (+03) In-Reply-To: References: To: weirdan@gmail.com Cc: PHP Development MIME-Version: 1.0 X-KeepSent: 52F2FB46:D6AB287E-4325838B:004EC5A7; type=4; name=$KeepSent Message-ID: Date: Wed, 23 Jan 2019 17:30:40 +0300 X-MIMETrack: Serialize by Router on SMTP1/Internet(Release 9.0.1FP7|August 17, 2016) at 23.01.2019 17:30:39, Serialize complete at 23.01.2019 17:30:39 Content-Type: multipart/alternative; boundary="=_alternative 004FB65E4325838B_=" X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1826-8.2.0.1013-24384.005 X-TMASE-Version: IMSVA-9.1.0.1826-8.2.1013-24384.005 X-TMASE-Result: 10--6.517700-10.000000 X-TMASE-MatchedRID: +gPRII3iIjAYzUbg+r0vVDTR2TFg0xG3GSqdEmeD/nVk2J2ef3Nd36jX S5JVvHq7sROO/p1phTALLLWyLNkDmqbPJCj86mr/A9lly13c/gErHkgIan9a0YSQG8W/C06AMna dwj0BvkVsbH9BSbGPLQANoQCrOcvDRpYY54qZBhBor4yxPAz7WYv8pidhVYOUAs7f5tvs5+hF4S l2jcoHq1CBXgbRgHMv+9AI+LLwgRwfE8yM4pjsD/7E6GNqs6ceavP8b9lJtWp2gyyw2xTBhV8HA XV8/VbWB8qm0VcyZcATy4qdNojIq440yv2SJ4TQkRecrise3VBZ3Lzl+XpOitrs+TJJqRe3h9Y4 qEKIe8Iez4mu/wOO8J6oP1a0mRIj X-TMASE-SNAP-Result: 1.821001.0001-0-2-1:0,12:0,22:0,33:0,34:0-0 Subject: HA: Re: [PHP-DEV] Proposal fo "Code-free constructors declaration" From: AGromov@alfabank.ru (Andrey O Gromov) --=_alternative 004FB65E4325838B_= Content-Type: text/plain; charset="US-ASCII" >> Proposed syntax >> class A($prop) extends B("BlaBla", $prop) { >> } >Would this work with anonymous classes? If so, how would the syntax look like? Currently this syntax can't be used with anonymous classes because those classes instantiated at once they declared and same syntax is used for forwarding parameters directly into constructor. new class(10) extends SomeClass implements SomeInterface { public function __construct($num) {...} } I think that it is possible to create additional rule when use "parameter_list" instead of "argument_list". Some research is required. But it will add some ambiguity when reading code. --=_alternative 004FB65E4325838B_=--