Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111477 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91102 invoked from network); 11 Aug 2020 17:26:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2020 17:26:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 389D11804AA for ; Tue, 11 Aug 2020 09:25:51 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 11 Aug 2020 09:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1597163148; bh=Fyp2r0CxHEk+ckL69oejo5L4J/FEzVmBVXqu0nikME0=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=a4rQLETeEGaZQpYlnrsUHHzOz9dNHqXRaEJhLcTsvLk58IMuIEnKu2WMk4dunXKia 7KG/oq+E4ZuFA44Cr6H+DwDbbVViqYTlwFHMqqfEIz9cJghjcmCAfxEmzEc0N4CpcE Hf4deCtoh1CV4eLr9nQFp0oc2N5FMogyU8v+R9Mk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.120] ([24.134.51.41]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MC30Z-1k0LdW48PV-00CPR5 for ; Tue, 11 Aug 2020 18:25:48 +0200 To: internals@lists.php.net References: Message-ID: <59019606-a3fd-3c19-e962-a847689244a9@gmx.net> Date: Tue, 11 Aug 2020 18:26:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:CuqJ2L6iFgp+feo8lSKXi3dXqK49BdqJjjr5f0Zlsb59aPEExXH LT5GC9rWL78fgo37oy4FGSvAeseiPr+8IFmT6GuVli5u+2u9XyZFKD1Q28Q4GvN6eZupL+G Gvcu1WfUOBU0sK8X5OMnVuAIT5IMCJDrhzjeSaXuiS88tHcZwrtQpc9VHx3D+whaDnqWXdM 6Grpy3mjJBbcsiUuXE9EQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:3Nr/ntOcHL0=:rx2qFC2ssB41V62giutx/j 1TSHSIq//B+wZSwc/YMR26+1EdduKn+TUNyTH6ghsOR6I4e1dG2rIuoTW4n5HtaS3ApoOo6xm sKEp9tcgmmaOz1dNmwr74Lyz/p8sv8z7VzcGq0W2MLwuqChowyg8GeK2tEjgkaULgLPRR+oor ddzOpoM/NkGjbL57uDjDhTvJJfeUgnj0oynvTjOvPIm96R872xUfL91ZrYbfdGyYzNY56AGWa GW6ESpEBzuq4DB4TcJQtrBtSF6mH1tItCeYQim+T9zisv/ymdOSQXuPyc4ujounn3hpW+bqRv pVppUSvnTZoDAOdCxF81PaRI2x7MD63W2H1nWgxK3LWVr4hsMSK4Id1+E/VlCFqh+WwN4i6Fo md3fY6KbHto9qndB86qVnGDXykh1xTUU+Vn9VIsGBuIdPH7UNQRxPULztTFvQq0wGaIW78uAW uuyugcL2eFblVyKUNgapdVyx/IsDZxc9tTKNpVlFpgGYtWLkDYP1iaiku25+HAMKr0tTwEIul r7sshtmpLCsKFOoebI5BkCLnUBJS9VFGEHJdvUncpgK/Tn6v4cvTNmdW9jtTV1rd/8DaFpk2G gQ6ShByFDyxte24mzjivjCOWHBz92PeOTrUX90exgYki7TT8ddP4K0JLzOe27XvvKRdpHLuyr lQskHcZyx/7OGOB4Jey4ZnjKf9TEMG/i8KTUqKk4ttA+HDciOAZf+D+HvsapJPIV2pPGbd9Lo S1KLqc7TDIwhQgna4mRgXhRBqVrQ2fphlWu5c4IY22jlglnMdklvDF+yzy/+pQ8oNOnh8quDr 4app3C8HSn3Wv1iACGmF1bUZy+yTnemOv0a+PxYlsYI6N/ZnWtiaYZSYS+6x9MmWIh4gn4jUb /0bq/gaXFy155jiPLCPdWd7j8HbSsCP67yryhHHmSqCmgDNtoSzUeZAQlpQZLxwxq5/3h6gcE v9KaOtDV3sGePal+5gZ7OcsUzGC3A1MLsLfDzqTviFDjTnJ2w9c+gqDwRlKBtTc6/NbuMuehZ E7+tX6ADcfTh1PEibCIpWDru53+ddlZzwK4LTfFZaCOkwCsAcX8tSFselvyPa8x6Z4TyiL4th PmDVOfFk4bOl2DikNvC78/4BQ1VQM4JE0Sz2dVx0UVBzD/ueus2Tp9TTKkQmP475NIcs4bOYw 9bQ7/RjNjnPsqa4rHHOk6gVkJ/zWbi0WJAg4a12ggfFJjvqwzaEx8QIMhgarR9FqWAh32gr92 IHuSrRcGiZjD0bSlG7HnbZClhhwhbYueXFiY/6A== Subject: Re: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change From: a.leathley@gmx.net (Andreas Leathley) On 11.08.20 18:07, Sara Golemon wrote: > Writing this on PHP 7 (or any earlier version for that matter) would be > valid syntax (ignored as a comment): > > #[SomeAttr(123)] > function someFunc() {} > > That's what's meant by Forward Compatibility. Library/Framework authors > could aggressively adopt attributes with the #[...] syntax, they can NOT= do > so with any other syntax. This would be a feature if libraries start parsing PHP token by token and start supporting the #[] syntax for the 7.x versions of PHP - then early adoption would be possible and it would be a real feature. But it seems unclear if that will happen, as it will probably have a heavy price on performance (and might have some complexity). And if some libraries implement it but others don't, then it might get confusing for users about why the new attribute syntax sometimes works and sometimes silently does nothing. It is also not perfect as multi-line attributes with #[ still break, or code with #[] followed by more code instead of a newline and then more cod= e.