Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111352 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77376 invoked from network); 6 Aug 2020 09:13:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Aug 2020 09:13:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 664211804B4 for ; Thu, 6 Aug 2020 01:12:01 -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-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (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, 6 Aug 2020 01:12:01 -0700 (PDT) Received: by mail-lj1-f194.google.com with SMTP id h19so50741548ljg.13 for ; Thu, 06 Aug 2020 01:12:00 -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=PEyErtJlcNlVJNCLsX9gWkKwBrC/sRzVoBtVxfY2SDw=; b=rIi5y2B3ENUzi9R3dTlzrEi+JvEmgM3PLmFP/hLGKqPtXYQLkQqTeh3sXzGQZn9xs/ 9aq1Ko7YUA3YOqvs1AgNjHDCjojGygFGFJ4V/NMJ3nmRd2X76VigjGK7Kfa5/ksF2bff 1+KgE8cT0guEBKGuDNk235pwdyT+qHEpG53aGFxnXYwGdpjJi+saWMZpnZiK+jHpMKJp Q3DoYhsDvBdfyH+gBJXEzln6ZuVoJt84ymuoy5qUUzrdAYuzu/J5zvKsHOL96LsinDlh SNvOnuvr8xvWGn6iR/N5zkqH2XFv6y2K/hAoN8rWuF8Ey8UKlbb3M60+WNorSflozWZe xwrA== 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=PEyErtJlcNlVJNCLsX9gWkKwBrC/sRzVoBtVxfY2SDw=; b=bWh86uWpyklcXjP5PM8lu5nsjrLxFvHvfudO2lukrFyFvGc5Nti7qNYc0kBSQrRF9F 3VYf7Nfn7sJmi8aB8umFVQTEn5wkCxjntP5vSXKyAaKItz79p4EECbBSHsIDMCDX8Vb8 1SRN14M85IC5HbI8U0LokM8kvv08vkLIaErWnTKC+CH8myRgCd+g7Colhsrv0wkxHJQa CYUWoZwjFJWa6cpOah4NNyXs3qexJILLuvVjuCSjT1lgs/jsIunkQdStKG+KZ5GCanfb 8FCnNgRJtZnYLSM4/ZlVIHhbn30IcqW0TtqD04s+CG5syjcKFlIqdyDKZ9ydiZUkxlch yfsw== X-Gm-Message-State: AOAM532/vBhXjeO2NOJX1/cXOClWcn+CFm9EMaNtFk5zAj0MCW4TRVY6 91ey5K0MFEHZ4mVp2R1b/AEiI0bWUXIc0sFNt/F2Qg== X-Google-Smtp-Source: ABdhPJxzg3LiW6INecQeHv2RgeUA2CR+DqmAL70dxKjLnB00YMyE+3Pjjmcl3irZ8kKe+C72hIk18YhSG3EnZj1/V58= X-Received: by 2002:a2e:a586:: with SMTP id m6mr3517409ljp.458.1596701517060; Thu, 06 Aug 2020 01:11:57 -0700 (PDT) MIME-Version: 1.0 References: <20200806091749.64675445@mcmic-probook.opensides.be> In-Reply-To: <20200806091749.64675445@mcmic-probook.opensides.be> Date: Thu, 6 Aug 2020 11:11:43 +0300 Message-ID: To: =?UTF-8?Q?C=C3=B4me_Chilliet?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000bc9ee905ac310abf" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: benas.molis.iml@gmail.com (Benas IML) --000000000000bc9ee905ac310abf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 6, 2020, 10:18 AM C=C3=B4me Chilliet < come.chilliet@fusiondirectory.org> wrote: > Le Thu, 6 Aug 2020 07:48:05 +0100 (BST), > Derick Rethans a =C3=A9crit : > > From the RFC: > > - No ending delimiter > > As said before, it does have an ending delimiter when they are arguments > since > there is the parenthesis around them. When there are no arguments I don= =E2=80=99t > see > the benefit of an ending delimiter, it=E2=80=99s easy to spot the end of= the word. Ending delimiter MAY help us in the future. I really, really hate all of those arguments stating "that we should care only about the present, not the future" and that even though `#[...]`/`@[...]` might bring benefits in the future, we should still choose `@@`". This shows clearly that some people are basing their views on subjective reasons rather than being objective. As far as this discussion is going, I see pro-`@@` people just saying "Arghhh, let's keep @@, it doesn't bring any benefits that other syntaxes do but we don't need them anyways, let's not speculate future". It's like saying you can either go through door A and get a free car or through door B and get the same car and **maybe**, even an additional 1,000$. We are playing probabilities here but at the moment, no one has said any substantial argument why `@@` is better and thus, `@[...]` seems like a better option in the long term. > > - Doesn't allow grouping > > I do not understand this argument, what is the point of grouping for @@? > Does grouping mean anything special for other syntaxes, or is it just to > save > keystrokes? If it is just to get a more concise syntax when there are > several > attributes, the fact that @@ do not need grouping is a pro, not a con. > No, it is not a pro. It's a matter of personal taste. You are basing your opinion on subjective views which goes against this RFC's principles - to choose a syntax that is the best based on the benefits it offers. > - No forwards compat with PHP 7 > > But no BC break either, while #[] introduces BC break. > Not true, technically speaking both `@@` and `#[]` have a BC break. Albeit `@@` has a smaller one. But by sacrificing a few very old codebases (that still use `#` not `//`), we are making sure that we won't run into any parsing problems in the future. And this is far more important. > - Not used ny another language > > @ is used by a lot of other languages, and @@ is the closest we can get i= n > PHP. > This is a pointless argument. `[...]`/`[[...]]` is also used by a lot of languages, `#[...]` and `@[...]` is the closest we can get to that. Heck, `@[...]` is the closest to both `@` and `[...]`. Best regards, Benas > --000000000000bc9ee905ac310abf--