Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111334 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38683 invoked from network); 5 Aug 2020 02:59:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Aug 2020 02:59:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D1A9E1804DB for ; Tue, 4 Aug 2020 18:57:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2048.outbound.protection.outlook.com [40.92.21.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 4 Aug 2020 18:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a9PG5nH2qGx3p1lL1yfPTf9OfSMAPMFjZ8Sw+dEwzVZBTUPjcuK+Cv5cB9uaRSUOfvRHok++cT+xEylOdvNp39k6tIJRvDVMrSsH2JP2nl6uG/go7nhSNDdht5ZYb6yumz3wa8PD0UUkqbOiD6MITRGXRIPMjRuaG/ZievIdCLtRHVsw3VIp0tmgPerjQx5VbRDuGXD+onIInOmCJNxriUbAbFyW8fzOe+u7Fh1e5z/XfrsaHzNBhNnmyBxDmyGdGXsimopGnrr9Qj4qnnHmIm7uY38duWL54aekiVZSSWliCidif+rDHSYSdBJV7xQgiRWAHQKqI8esBEemqXqzrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C/G8nWb0l9XsuJtoWglTR4zUZpn3IEwrihbCdL/SQuY=; b=QHvyDx1T5PNM6fK63E7C7nYkVfZGAB2sdOlwHvhdKWNkAFX/MHNxfmtU7kIro/pn1Mw02pOpEurW0emvAD+jN9fXm0rMZZYywSfHlsLQ73Q+JbA7NNTHF+QE1fvrw+qUrYdvFJoJa1EPjGZO2fJsRijGbfjUD/canXsVNjx+yzuf6v4YzCbMDf7ib+aY5nJ2z2qzseK/rMcnkvPrLUER6jABNXQf+wvN7GPYSUydm9GZsUnXmEfi8PF8nziPzMWA0W9N4PXpB394fT63KZt7rePNlyGhW3KSHeG5XpR/ri6Qxp+Wy/p13ZHDCyZPLgG2ocD1Fh5RZENxpKPj4wJMtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C/G8nWb0l9XsuJtoWglTR4zUZpn3IEwrihbCdL/SQuY=; b=AqAdD30GMqfNhlchYmnOQfdAuTFHGe7iqn04jKxIWIt5dX+iSmWpmqk+HlNkgO4gRZnvZWjN+tHH5zYhC6/a1qef0Zq4RQeQbDoK2xFlbKOdiWNRkuKjLlN40RHvngpli6HVcqurkOT1xf8PaTQrQx3HCqJpNeX3J/mSYeeDjkIHsU12jATUuXy9J11xSLysssMNywSS0wL/1TM2WGzI//VQLEgovyxQNbr0E3+DRe4al2sF00+eGC2LfaBLtxDUbRiKRPp2QTw+fyZLyaE8eeS24bIQEJxEMhg6HuU9aVkdOZ+Ko1+7nDqZTg3O91hzUkMTUkY589yS24peEFJW7A== Received: from MW2NAM12FT028.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::4b) by MW2NAM12HT245.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::258) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.10; Wed, 5 Aug 2020 01:57:37 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:fc65::52) by MW2NAM12FT028.mail.protection.outlook.com (2a01:111:e400:fc65::494) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.10 via Frontend Transport; Wed, 5 Aug 2020 01:57:37 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::cc10:a3e2:1dcf:adc1]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::cc10:a3e2:1dcf:adc1%6]) with mapi id 15.20.3239.022; Wed, 5 Aug 2020 01:57:37 +0000 To: Derick Rethans , PHP Developers Mailing List Thread-Topic: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 Thread-Index: AQHWamWPHsqLR0j+3kKp37krfiTdR6koudCk Date: Wed, 5 Aug 2020 01:57:37 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:FFB15768F61ECBB0DD6CA51DF7B356EE6E0408BA41FC1008DAC689C728D51411;UpperCasedChecksum:3FF5C70161841DAD09E02F3645716B0D3B5FC599C963DF6F74FC314A7B93B7C3;SizeAsReceived:7108;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [zkcDYHnZ1qw29o7W/V0fP/Kr0Q8M9Rj7MDG/ZDfdqG2oQLgsyr1dneg0j99oeczt] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: d72b37b7-4095-4890-f0ad-08d838e2ed80 x-ms-traffictypediagnostic: MW2NAM12HT245: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zolFS7Y0xhDvLNKEB4EKDhXymWbEsxitjGkdwQdV0c1gjLYQPoDdbM+Ncq9R/XQsCcECzV9/U7wo3dwh0ICfwd7u+QBphJ+oOxvv62x7t8FxBo/R0Y3iEWPeGDp/C0aaDePyM3MidB0FE/U2PRcfGEeoRbjWUuF5mH3ml4J7CNgWNa5tmsJ3DwII7ZJiQnyTGxlk51081wxdNj6Pm5hCq/UNdAe/OegWmuMezx+frLahRitAfpuZ+xJOdnAL9Lb0 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR07MB6618.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: G8bcHNsNIDeXyZoA1ZIUf4XeUrcVIzwsh/XsczwITMdQ74Tv1xIbA7f5rDazy1G4RpaE/SIhDT8CaJkzmZSxIv8G7NJQFLe4+jbCO+49t1ciZt4tR8IggTApB06spPfd8R7xxZoOdkS0IYVtn4QXFHnymVCE6pbBw1+sK2MLUW5E13WIilju390N3VJ4RmyP0NAVBnuB2pXv95eI184KVw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT028.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: d72b37b7-4095-4890-f0ad-08d838e2ed80 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2020 01:57:37.0600 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM12HT245 Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: tysonandre775@hotmail.com (tyson andre) Hi Derick,=0A= =0A= > Out of Banjamin's suggestion[1], I've updated the Shorter Attribute =0A= > Syntax Change RFC to reflect that process:=0A= > =0A= > https://wiki.php.net/rfc/shorter_attribute_syntax_change=0A= > =0A= > Patches and comments welcome.=0A= =0A= 1. I feel like "Changes the lexing of **remaining** tokens" should also be = included in the table following it - that's a major difference between `#[`= (Yes) and each of the other proposals (No).=0A= The last time a substantial lexing change (that affected the following = tokens, not just the tokens in question) happened was https://wiki.php.net/= rfc/flexible_heredoc_nowdoc_syntaxes , but flexible heredoc is rare in prac= tice and a project using it would almost always need to drop support for 7.= 2.=0A= I expect attributes to be used much, much more frequently than flexible= heredoc, and to break in subtler ways.=0A= Projects such as php-parser would be affected by the change to lexing, = and would either have to force users to specify the php major version or to= always emulate 8.0's lexing if `#[` was encountered in a T_COMMENT token.= =0A= =0A= My earlier objections to `#[` were https://externals.io/message/111218#= 111239=0A= =0A= To add to that, the benefit of forwards compatibility is also a drawbac= k in some ways for the next few years (or longer, if you include OSes that = unofficially backport security patches)=0A= A developer running php7 could run `php --syntax-check` locally on a fi= le containing attributes=0A= and assume it'd work in php 8 when deployed to a php 8 environment or w= hen publishing a library to packagist.=0A= (e.g. `#[DeprecationReason('This won't work because X')]` has a single = quote after `won` terminating a string literal, resulting in a parse error = only affecting php 8)=0A= =0A= Better tooling would help to avoid that, but better tooling isn't unive= rsal.=0A= 2. This RFC mentions objections to `@@` but not objections to other syntaxe= s.=0A= Summarizing/Linking the main arguments for/against all 4+ proposed synt= axes in an appendix of the RFC (with some reasonable length limit) would he= lp in making an informed vote.=0A= =0A= There have been over 50 emails so far in https://externals.io/message/1= 11300 and https://externals.io/message/111312=0A= =0A= Thanks,=0A= - Tyson=