Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92804 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11450 invoked from network); 26 Apr 2016 17:14:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 17:14:47 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.111.101 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.111.101 mail-bn1bbn0101.outbound.protection.outlook.com Received: from [157.56.111.101] ([157.56.111.101:21952] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/15-20013-502AF175 for ; Tue, 26 Apr 2016 13:14:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dErFs8JFeqgyNHDs5RnAGVI4i0n/5SWLFWDbj/HT4RU=; b=iI9UxKGLSbyBQaQLu2lx9OlqTbDYjpOeC45CKbjcHUIYIF1O47A8iCBgSb8z/R2T9swkeioepHlq43hiLEfeGqgCMyc22GktEk7s99/p3tSzK96bHUx0eiu6LyjJLmzVwnBPZcfLyVdVIgkMy4JPZb+7W2BQO+Xq8agDXAzuAio= Received: from CY1PR0201MB1786.namprd02.prod.outlook.com (10.163.55.19) by CY1PR0201MB1785.namprd02.prod.outlook.com (10.163.55.18) with Microsoft SMTP Server (TLS) id 15.1.477.8; Tue, 26 Apr 2016 17:14:42 +0000 Received: from CY1PR0201MB1786.namprd02.prod.outlook.com ([10.163.55.19]) by CY1PR0201MB1786.namprd02.prod.outlook.com ([10.163.55.19]) with mapi id 15.01.0477.012; Tue, 26 Apr 2016 17:14:42 +0000 To: Dominic Grostate CC: "rowan.collins@gmail.com" , PHP internals , Stanislav Malyshev Thread-Topic: [PHP-DEV] [RFC] PHP Attributes Thread-Index: AQHRnBAun0yJJJCyoUaLowSO4sZVN5+ZTXSAgAAPUwCAATsvgIAActYAgAAYcACAAARvAIAA8H6AgABlJSKAAAiNqA== Date: Tue, 26 Apr 2016 17:14:42 +0000 Message-ID: References: <571DD94B.3060604@zend.com> <571E63D0.8080800@gmail.com> <9c24f969-cb0e-cb46-a23c-6e06e7de7d79@gmail.com> <571E7C08.6010309@gmail.com> <571F1B95.9030203@zend.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: f67aaf32-6afa-4256-f2da-08d36df641fe x-microsoft-exchange-diagnostics: 1;CY1PR0201MB1785;5:/XolPBcmWW/Ybi3tWdQ1j/ep2Wax4uNtO51McTJuXGAO53cefkb/oKB9V/3wu/mzWATRK3qHLlN1cnewqxmByhloZ+ijm55kv0Al7cGR/RpLHJPH4q0lGsCWMbHpAW615FBmrDqC8pm+lUQG71V7yg==;24:ImQXCTkmCZmRjpN0SEms+fryaDV03JAmkXN8IIrsvNJYb/uiRTy2ku++cNYsTQL5nPyV0c71t1aNTMVZLjxSzKV6x1OPpnDQQrpAaH2qQKs=;7:e4yxTX4aYUExFzH3Qbu4AfxOx8+r6z6o6CVZk0E9qLVMvvWd1hkQvVM5ljuVjXPSp3cU0WXJ4U90uzOXT0dsqMDowRtK01PgcMlCR6fz6GY35bhOHm+Kn2J3Xt7ZLD9zmV8o2uDY/RKzOEbkVmLtnRZLyI4nXqsBwN+dhd7GZ1pjxRM20QqcA4COnHDi5u7F x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1785; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:CY1PR0201MB1785;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1785; x-forefront-prvs: 0924C6A0D5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(377454003)(24454002)(74316001)(102836003)(3846002)(19627405001)(5008740100001)(6116002)(87936001)(19617315012)(50986999)(99286002)(86362001)(9686002)(11100500001)(110136002)(586003)(66066001)(5004730100002)(93886004)(19625215002)(33656002)(3280700002)(81166005)(3900700001)(19580405001)(4326007)(5002640100001)(19580395003)(122556002)(2900100001)(106116001)(189998001)(2950100001)(15975445007)(5003600100002)(76576001)(16799955002)(1220700001)(1096002)(92566002)(3660700001)(54356999)(77096005)(16297215004)(16236675004)(2906002)(15188155005)(10400500002)(76176999)(556834004);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0201MB1785;H:CY1PR0201MB1786.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_CY1PR0201MB17867883CAF70F426788E531BF630CY1PR0201MB1786_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2016 17:14:42.2387 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1785 Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: dmitry@zend.com (Dmitry Stogov) --_000_CY1PR0201MB17867883CAF70F426788E531BF630CY1PR0201MB1786_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Just because HHVM is closer to PHP than C#. ________________________________ From: Dominic Grostate Sent: Tuesday, April 26, 2016 19:43 To: Dmitry Stogov Cc: rowan.collins@gmail.com; PHP internals; Stanislav Malyshev Subject: Re: [PHP-DEV] [RFC] PHP Attributes Why not like C#? [Description("My Function")] function my_function() {} Without the semicolon, this wouldn't be valid in any other context. On 26 Apr 2016 8:41 a.m., "Dmitry Stogov" > wrote: On 04/25/2016 11:20 PM, Stanislav Malyshev wrote: Hi! No, but this is valid: @atrr(); function foo() { ... } That's perhaps a little too close for comfort...? That's different syntax. If you put ; in the middle of statement, it can change - "$c =3D $a + $b;" is not the same as "$c =3D $a; + $b;" - but nobody thinks + can not be used because of that. As I said, << and >> are existing operators too, so if you are creative enough, I'm sure you can find cases like that too. Hi Stas, You may try to replace attribute syntax with @attr(...) (without semicolon)= into our PHP parser. Note that we have LALR grammar + restrictions caused by semantic actions. If you are able to do this, I'll add it into the RFC as an option. Thanks. Dmitry. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php --_000_CY1PR0201MB17867883CAF70F426788E531BF630CY1PR0201MB1786_--