Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111155 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52968 invoked from network); 23 Jul 2020 17:17:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jul 2020 17:17:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 302D2180541 for ; Thu, 23 Jul 2020 09:11:58 -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,HTML_MESSAGE, 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-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) (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 09:11:57 -0700 (PDT) Received: by mail-oi1-f196.google.com with SMTP id l63so5436628oih.13 for ; Thu, 23 Jul 2020 09:11:57 -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; bh=gyAYINnvjdrWiR99OQNYU0bOochY3NKNK3vD1dU8ywU=; b=kT99DrIVwGNrhmA/7P5O7uBGu3RpOibr54odIif1lFcBBnP+4IqXxPyCqeMbKNFEM6 Q4LFrwqbY+FEEmTYKnpB5HkIaVpjMVB9zoJ6FN26qgJQNkcFVTMCtN0dr5+0RVAMFhzX tzT162bxus+ZCYlER0pWMG9C3sWR70tupzbzJED69q/0BouCvOm3nSF9X1t3pZN5BHLY 3JYTDLzPn6lL1SS/1dVYIUKdqVQUQc5nMwnsb0Q0IwyXViQwWI/dIFtq/FyjuUYYKpXm JbtALtcaaRjY3iklBtwO3FV91T4GMjK6Ud70+3l4mm8wVNz9SUHNFZGuNY2k9y3TFyM1 mbSA== 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; bh=gyAYINnvjdrWiR99OQNYU0bOochY3NKNK3vD1dU8ywU=; b=XxK5VuuOMYBoB2iQZjIKTm8rL6zrXswRMiku88eype3/rBw1frl6OY7P74jLkFeVcW nnMecr5fwufRtb5VJZxXDBbUK8ziag+qUEXxUE6QFTiZ2OnkLj45tiIPfp5M4X5l9Kc9 X/89qJ8yr8p1QXwTwXU/nnfqsygGxV6dzDuW4C8ijvE1C/GVRXmcgzluQ5Ylf3jbsyRX ig2Hb97DbGczt4W4h2/g7Dg9cO1CQ812MWNRvMu9KF7sxRIMG80BxofzQLPu+HL0WoSs OyXyoi93o4g2Zsa6dHO2oKta9nvsLx3CKompJEdNCE9EUVARwLW8X8VP873prOgEyzIq Xvww== X-Gm-Message-State: AOAM531f/TLK4gCXQCcDtS8goY+foejQNDDodEhexMGM1iN1Av7GblEF vslNllblHmN3CoekkCA0EK+J2LEcyJyNU/fCWnE= X-Google-Smtp-Source: ABdhPJzPZ/MXhtyTJHR6ZzSde088L+92PLofnM2H1dy3QjGf6aOImgpq7XSzV0Mbmzz0f4c0WRGe09MdDKmlwdilnzQ= X-Received: by 2002:aca:4c4a:: with SMTP id z71mr4456254oia.17.1595520714751; Thu, 23 Jul 2020 09:11:54 -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 13:11:41 -0300 Message-ID: To: Benas IML Cc: Marcio Almada , Theodore Brown , Mark Randall , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000006f440305ab1e1d04" Subject: Re: [PHP-DEV] The @@ is terrible, are we sure we're OK with it? From: david.proweb@gmail.com (David Rodrigues) --0000000000006f440305ab1e1d04 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think that we need some symbol that isn't open-and-close like << and >>, because it will conflict with shift operation, and basically all open-and-close options are used for other things; or that confuses with error suppression like @@ and comments like #[]. Maybe we really need a new keyword, so we can apply it "as a function": attr(Attribute(), Attribute()) function () {...} or attribute(). Or even more complex syntaxes, like: [: Attribute :]. Atenciosamente, David Rodrigues Em qui., 23 de jul. de 2020 =C3=A0s 12:32, Benas IML escreveu: > Just to chime in, `<<...>>` does not have any BC implications or problems > with bit shift operators. > > On Thu, Jul 23, 2020, 6:05 PM Marcio Almada wrote= : > > > 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 > > from the > > > > > last vote would obviously take precedence. > > > > > > > > I don't believe the concern is that we have something unworkable > > sitting > > > > 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 mad= e > > the > > > > 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 likel= y > > > > 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 person= al > > 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 > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > --0000000000006f440305ab1e1d04--