Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111151 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40182 invoked from network); 23 Jul 2020 16:10:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jul 2020 16:10:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5C8CE180508 for ; Thu, 23 Jul 2020 08:04:43 -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=0.0 required=5.0 tests=BAYES_40,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_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 ; Thu, 23 Jul 2020 08:04:43 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id i19so3435759lfj.8 for ; Thu, 23 Jul 2020 08:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=z0ML0M08mTwhCMrKWc8amtzJ3/uBEfnVR5RKmVtEShs=; b=vEWk0UWZ2irjeeXdNIGr923KF/35r2moxLdIiAGT+gmIApQKnf/42qp0slpkK0nWN/ SXSa5260K35dQr7T5zM7wOrnuY4TbLOJWbPTD0pCAo0enMmyfDjQKS3uw4P7XOABkDDf p1RDONiHyfLuuLWO/sddVr/XZh+FxxpME872URWd4wOOW0rVPKkXflWUuOpNdVTfkYnu BpNzGPiaP3ooSHOWblAx2hTxPePyCtxVLp4m5HjN0TB44vmwggS8AxnMvnz6aZDIlG71 LLsNQVsoaoqc6rGzU1ZL1hjwNdva3l9C7bPzMx/Yh0YhyLhHkG2Fq6XQckmixbu9TRux ueTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=z0ML0M08mTwhCMrKWc8amtzJ3/uBEfnVR5RKmVtEShs=; b=RUtkKmxQ78KXDq4jACTx8rs0Mx3CpnX7bd1VehNYw+nAMBBTxUxlRij9mSQ7KUJPcl fhVhOq6qNNbCkHiZBaEbktC15GfVr8Kwabw4mXUpYTOGvvyec7u0PXMr8MqIzBpjJNn7 cTWs7FgThytOrViCbxszCmlAQVkPa4ys2I5+OqhD/9D7XwGmZj706joAJhRyvAHHMHcm MN8tUMDWkLZzQgqm2Qbh9bcejqxvE9vWHsf6rmvTkhSF/0a12Wqwp5ZjiMUVYpMMujKd jirvb2bAcdj2XGl3Y0zp7v5ErJwFOmonk+lFuyvOa5xyHM+LIAw87b5T4FilkyGF4J22 YCTw== X-Gm-Message-State: AOAM532IfEbm8CRVhPAkV28Djr2fDBbINOKwV8ESEwts+KByWKJ9y9X/ QPvLkWM2MLx3U2x+Qn6cg9BZ8bXzD6UXAmQKnC0= X-Google-Smtp-Source: ABdhPJxSOcZvC6GKHWhbDOfFBXN4i8KQrwKcY5iDEf/Ckf7s3kzUFZ3pXQ/4212AQMmxh6fcSycKgVEFRrDchBV/4/A= X-Received: by 2002:ac2:4d4f:: with SMTP id 15mr2460458lfp.163.1595516681340; Thu, 23 Jul 2020 08:04:41 -0700 (PDT) MIME-Version: 1.0 References: <1ed9899c-3816-4646-bad7-4110e4a68978@DM3NAM05FT049.eop-nam05.prod.protection.outlook.com> In-Reply-To: Date: Thu, 23 Jul 2020 12:04:29 -0300 Message-ID: To: Theodore Brown Cc: Mark Randall , "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] The @@ is terrible, are we sure we're OK with it? From: marcio.web2@gmail.com (Marcio Almada) Hi > On Thu, July 23 2020 at 1:26 AM Mark Randall wrote: > > > On 23/07/2020 02:00, Sara Golemon wrote: > > > Regards the vote; I don't believe that @@ has been proven unworkable, > > > however if I'm wrong about that, then the second choice selection fro= m the > > > last vote would obviously take precedence. > > > > I don't believe the concern is that we have something unworkable sittin= g > > in front of us right now, after all if that were the case we would not > > be needing to have this conversation as the RFC would already have been > > rendered void. > > > > What we do have, is a deep sense of unease that we collectively made th= e > > wrong decision, based on, in part, incomplete information. > > > > While the initial block to @@ has been remedied by a larger > > language-level change, that the problem existed at all provided a clear > > example of the widely unforeseen challenges associated with the @@ > > syntax and its lack of closing tags, and focused renewed attention on > > long-term consequences which where perhaps not given enough > > consideration during the vote. > > > > There has been one occurrence already, there will likely be more in the > > future. But what specifically will they be and how severe? We likely > > will not know until they happen. > > Hi Mark, > > I don't agree that there "will likely be more in the future". When I > asked Nikita if he could think of any example that would end up being > a problem, the only one he listed was a infinite parser lookahead > requirement if a) attributes were allowed on statements and b) > generics were implemented with curly braces instead of angle brackets. > > He noted that "it's unlikely we'd actually do that" and ended his > email by saying "it is more likely than not, that we will not > encounter any issues of that nature." [1] > > The @ attribute syntax has been used in other C family languages for > years, and to my knowledge hasn't caused any problems in practice. > > It is actually the <<>> variant that is more likely to back us into a > corner when it comes to future syntax like nested attributes (the RFC > authors considered it to cross a line of unacceptable ugliness, > and the alternative `new Attribute` syntax has technical problems). > This may be one reason Hack is moving away from it to @. > > > But what we can say with reasonable confidence is we have an option > > on the table that is technically superior > > I don't agree that #[] is technically superior. The implementation is > virtually identical. The main practical difference is that hash > comments could no longer start with a [ character, which would be > surprising behavior and a larger BC break (there's definitely code in > the wild using this right now). > > If you have a concrete example of syntax that is *likely* to cause a > problem with @@, please share it. From my perspective, @@ is closest > to the syntax used by the majority of C family languages for > attributes, and thus is *least likely* to present future challenges. > > Best regards, > Theodore I was going to reply these same things, but you beat me to it. But just to complement, after looking at the patches it became a bit evident that most of the concerns being raised against @@ also work against the other proposals. All have a certain level of BC break due to parsing ambiguity: - @@ can break the silence operator when it's chained (useless anyway) - #[...] breaks comments - <<...>> has problems with bit shift operators From all these tradeoffs I'd rather compromise on breaking the useless chaining of error suppression operators, FOR SURE. I have the impression most of this thread at this point is about personal taste on what was voted rather than technical. Hopefully it's a wrong impression. > > [1]: https://externals.io/message/110568#111053 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > Ty, M=C3=A1rcio