Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110364 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88971 invoked from network); 4 Jun 2020 12:05:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jun 2020 12:05:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 48CB31804CE for ; Thu, 4 Jun 2020 03:47:34 -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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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, 4 Jun 2020 03:47:33 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id 82so3292039lfh.2 for ; Thu, 04 Jun 2020 03:47:33 -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=qA2mDvUPjMXT4BylpuPo9ec7kCmUx7K85Dk/XPVL4To=; b=F7nsB75Xj/Uyr0vPvtXCLnKFyd4a25vQ0pnqQqxzA59R+rGr4XoTpgbpzhutLCLXJ+ pZcy4xKVzRl3ItJZJaWdMM/kCs1FttdgIHzZGTKoczwssUJqGEoBsLNo915M3EFM9dCE qEwEonpiZZzpqAzrUyLq8ogZK8ftKyYUXXvMqYbkxSbBdCF6IZk+PBCpdY/FOivOQdUQ xyu7sKap5lCNyHVxgzkXOTapFxQFy3u3A/2mGdbYpxjoaZLlM9lI0O1Tb5HE11LrUbV0 RN59ZEIivwWeVy04y8xTFh/bmQLCUTxkL0DVaY1EPaER7vaqtrDcbsILcNT9M6WojCKe GSrQ== 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=qA2mDvUPjMXT4BylpuPo9ec7kCmUx7K85Dk/XPVL4To=; b=pBmwaCU0RQp8DblTeHfcRks3lmAp+SQsojeedvE/NqaveCIXZUcw5Eb5mwrcNLTvJ1 hm/j6mIedAF9Db+WN2Mxrpt39AinAWrVe9gTM0M3xmEHYIgklxlFjBWiTs2/sz0G9SB3 vPx/5X+dS8Fb9uBsCxAaFx+ZVrfatFCbR0pg1UyJeCZ+kQydK3g1f4J+tL8ktk/e8DG+ DKKDZBkxyWXWBi3aaehVq+zCVXzrxXOSxb4vnFrx7ya59PZbOC4JW2BLfAVwPsvR9KhB HWNnQm+5f7ERNJjqq+Ty9nL2+ydK58tczu2EzIokhc8RbF1Vdm76MXZzqMcLGOh3Jcuc DppQ== X-Gm-Message-State: AOAM530jJ7i1MTBa3du4NVBv+xeu7V5ljAr/E421T519zwI8Jq5QVgjO V064+kuntSJ9ueoXP7FksHUVostNmrXpm7t6amU= X-Google-Smtp-Source: ABdhPJx1GEEvFblGUEbDlV8zt7W6SmFq1TDd/joyemfYnwZ0cJaD/IBhvVHZBcCyno13oRAjCZu1DNTfZB/NJIJRPpo= X-Received: by 2002:a19:4b89:: with SMTP id y131mr2166334lfa.16.1591267649978; Thu, 04 Jun 2020 03:47:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 4 Jun 2020 13:47:17 +0300 Message-ID: To: Ilija Tovilo Cc: internals Content-Type: multipart/alternative; boundary="00000000000005053705a73fdf03" Subject: Re: [PHP-DEV] [RFC] Shorter attribute syntax From: benas.molis.iml@gmail.com (Benas IML) --00000000000005053705a73fdf03 Content-Type: text/plain; charset="UTF-8" Hey! That's why I am against this RFC or any other "change style to what I prefer". PHP's current attribute syntax is consistent with other languages and poses no BC breaks whatsoever. Best regards, Benas On Thu, Jun 4, 2020, 1:37 PM Ilija Tovilo wrote: > > > Does the PHP parser prevent us from adopting #[attr]? I presume C#'s > [attr] > > > syntax and C++'s [[attr]] are impossible due to PHP's short array > syntax. > > > > yes, that would create ambiguity in the parser since `#` (just like `//`) > > is for comments. > > I've mentioned this off-list before. If we consider @@ with a BC break > we could also consider #[] by making #[ a symbol. > This is also a breaking change but a probably similarly small one. It > would break code like this: > > # Comments still work > #[ <-- But they can't start with #[ > > To me both of those look acceptable but #[ looks nicer (but that's > just my personal preference). > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00000000000005053705a73fdf03--