Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111132 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53916 invoked from network); 22 Jul 2020 18:11:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jul 2020 18:11:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3F348180540 for ; Wed, 22 Jul 2020 10:05:52 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11olkn2089.outbound.protection.outlook.com [40.92.18.89]) (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 ; Wed, 22 Jul 2020 10:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VQbI8pKL6of/ouYCOnciJZgLUnZPQwob9pRjjxvHTw3PaV3FJA5AYts+zqoFj3tJVYrQkEFJO9bzzWewmQmKPa75DVrZDCOvjpjLGYSuARly/kEadQVJ6dD7abgbNAm9ggKRFQvERNpPJBRblUmZuGuHEH5987mf++aksYxG8D26Z7iT/EIA4pITOtev/SiR+jBPDAQe62/U/kw17XJ6e0bYdahnPaDeEhwVAxnBW2aHt1d/RnFVkobkEWJucQ1XlN5PeQ0YuQNJN+NUK3GCgP7Jt8YY0DHRQi4eSHolKPA9mb+ETEAanto6rgQakMmMNu3wqUGlVVU/HKf6sa6MTw== 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=BLHcmk8NFpdSwfDKPOVMkKCTWuX/uar2wKoql5xSLt0=; b=Bajlt9lfDgV6vsSuFzoj3TjL2PPfgSraiWvgFDkIzNb2kP60TQ+LV8jIiuv7eWLjQpUvu65RsTnyxKepOPqvh/+Epw9cpWUpITTE/JCb8KmSqvvkbkOfvgaLaILzGdEShzx9DqyXsPpTa1LMELCBqY1J5sfZE/gLW5vd/AtyDia17RXASV4JgvIAznmxA6DGrkCCv0STc32s6oo6jFXPeZA5APO+cBoLwsZVEvdmvQsW7VryhM+mKSfjvILxSmM0jP3CysfRHfKSopDq1EeZ2DLhNLcPbo6gcegaXm/I69ptCsnf7Maqn11Te/TcoM+7QVWG9IoCEsyEDXU0PUy65A== 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=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BLHcmk8NFpdSwfDKPOVMkKCTWuX/uar2wKoql5xSLt0=; b=eej8p4c/xbIGswCkQT+we8GCwN5WfN1J8zxrwGJSE3vYArWQmoe6zdfYF0thfTnX+pP+28yjL1viNgj6U2HC0CC8wnKpztWmzaVtJyEcilJFZfAQOEXKw3pBvq8241GdnRwAEASuTZpIPkMjnwRsUbDTxo+9TIS2nUH53W+LR+TJjLl5F+5gWcJuwjNNV/ku64aDYEHzL+cuieMf2vyuFkTp8yynFesJZddQi7MeegOpNX5iGE5JdE85XdQjanhFSBEzjuEQTqHerlvuSS7UsPMwY+oIpaoKzGW3TKurH5if6ljdg5kIexbQ/0H71Gm7p7fBHsFI1fwXsKkfZoDBdg== Received: from DM6NAM11FT037.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::4a) by DM6NAM11HT082.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::295) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18; Wed, 22 Jul 2020 17:05:49 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com (2a01:111:e400:fc4d::4f) by DM6NAM11FT037.mail.protection.outlook.com (2a01:111:e400:fc4d::122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.10 via Frontend Transport; Wed, 22 Jul 2020 17:05:49 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::fc6c:38b0:fa18:f355]) by BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::fc6c:38b0:fa18:f355%7]) with mapi id 15.20.3216.020; Wed, 22 Jul 2020 17:05:49 +0000 To: Derick Rethans , PHP Developers Mailing List Thread-Topic: [PHP-DEV] The @@ is terrible, are we sure we're OK with it? Thread-Index: AQHWYB+rUGwGcqcE20Oh+f8rjGIUUKkTxai4 Date: Wed, 22 Jul 2020 17:05:49 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:B2CE40DB3802814B85C7DC5F6471469B36588BCEC24FA9CE7DD0788712687A05;UpperCasedChecksum:8ABBE86C5448379FAB6093284866ABEC5B8B8F9B38E6532160052EB6F588112D;SizeAsReceived:6951;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [QFo5F53Sxgz/RBGdUHYI1buOse1e7mhb] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 34bc9e6e-e49d-4484-48d9-08d82e617bec x-ms-traffictypediagnostic: DM6NAM11HT082: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PSpOKl9gEmPgAYzv1ZMN5AEFWqCI974X36tsIHyaBAxOMmJqjhSJzU5Y8yC92Xjnj10qBi9Iuj8BfWAUXIMljF2mh0aYjVZUKyNQeohzARks/1ZdToriE2zjDGfBgE2Bn7rJ/kmwiGpFbVY5BKS3ROYIuXUSXOGUcjE32p3PNbIqPEspymD/Mgz1mrXDE13BaPdkMaEguDX0YqnNDuoUX80r4agP1SAzsPy7+ioM8AliQV3O9UNzgIQYYlkolz6V x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR05MB6535.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: 3BGXqiZyhb88YysWBWH51thWyQiRw+FwbCR3HIV4pHOa7bx7MKjA8d9tk80Z2qJqNqDtQ0XlY7HHqU1sspuzqQkrOrrwFV1GsqY7EerJHOUAAlMlygN2BXjHbjt0A9iLNf1giWVcdlk02zYx4ltkcQ== 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: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 34bc9e6e-e49d-4484-48d9-08d82e617bec X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2020 17:05:49.7923 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT082 Subject: Re: [PHP-DEV] The @@ is terrible, are we sure we're OK with it? From: theodorejb@outlook.com (Theodore Brown) On Wed, July 22 2020 at 7:00 AM Derick Rethans wrote:=0A= =0A= > I know we've voted twice on this already, but are we really sure that=0A= > the @@ syntax is a good idea?=0A= > =0A= > - There are lots of grumbles, both on here, room 11, as well as in the=0A= > wider community (https://www.reddit.com/r/PHP/comments/hjpu79/it_is/)= =0A= > - It has the distinct possibility to cause further parsing issues, akin= =0A= > to what ended up happening with what Nikita is addressing at=0A= > https://wiki.php.net/rfc/namespaced_names_as_token=0A= > - There is no "end symbol" to make finding occurences easier.=0A= > - It is a syntax *no other language* uses.=0A= > - @ is never going to go away, so the possibility of @@ moving to @ is=0A= > also 0.=0A= > =0A= > Please, let's do the sensible and use the Rusty #[...] syntax.=0A= =0A= Hi Derick,=0A= =0A= Most of the comments in that Reddit thread appear to be positive or=0A= neutral, and in the earlier community poll, the @@ syntax received by=0A= far the most votes (https://www.reddit.com/r/PHP/comments/h06bra/community_= poll_attribute_syntax/).=0A= So while some in the community may prefer a different syntax, this=0A= doesn't seem to reflect the majority.=0A= =0A= If @@ actually has parsing issues, then I would agree that we need to=0A= pick another syntax. But there aren't any issues following Nikita's=0A= RFC to treat namespaced names as tokens. Please check out the=0A= implementation and let me know if you find any problems:=0A= https://github.com/php/php-src/pull/5796.=0A= =0A= While most would like to have a single @ character for attributes,=0A= since this isn't possible @@ is the closest alternative, and it=0A= shouldn't present any parsing issues that wouldn't also affect a=0A= single @ character. Of course it will always be possible to think of=0A= theoretical ambiguities with unconventional future syntax, but in=0A= practice this hasn't been an issue for the many other languages using @.=0A= =0A= One of the benefits of @@ is actually making it easier to find=0A= occurrences. <<>> is problematic here since these characters also=0A= occur in heredocs/nowdocs and bit shifts. And the ending bracket of=0A= #[] is also used for arrays, so it's not clear that this is very=0A= helpful, either.=0A= =0A= The benefit of #[] being exactly the same as another language was=0A= considered in the Shorter Attribute Syntax RFC, but apparently most=0A= voters didn't feel that this outweighed the downsides of a larger BC=0A= break, extra verbosity, and possible confusion with comments.=0A= =0A= If there isn't an actual technical problem with the implementation, I=0A= don't think it would be appropriate to hold another vote, or discard=0A= the first preference vote of all those who preferred the @@ syntax.=0A= =0A= Best regards,=0A= Theodore=