Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120925 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75047 invoked from network); 23 Aug 2023 08:16:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Aug 2023 08:16:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CA0611804B4 for ; Wed, 23 Aug 2023 01:16:48 -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, T_SCC_BODY_TEXT_LINE 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-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 23 Aug 2023 01:16:45 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-d7225259f52so5321787276.0 for ; Wed, 23 Aug 2023 01:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692778604; x=1693383404; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MWjgYqFH/puginbhc/skfntsNw0PGNca+fvZbWLNLto=; b=NndQJs67mNqF916uMM44u29jgm5r3I98RHcrE6kTCLXLINLXqLk0fl84SdFanPi08f aWv9fT/Ypz2HIcRhy36KvSGhQ0prs3V4Mj7rApyFQMon0UT8hH1ypmhnNGWY1wVzORB2 1lgUN7jLfYOKsDdGWpDazDEcDtod/gRErxDlOrPlmy0B7h8GtNKsGnpwxMiyKBT1Bk2T muYYRGVZifDMx0XEsanlPdlsAcunrl/hVAqzgKRI3ugaJveKyWvXzW8fXJL/wxaWOxTA Eb8vs6zXE6hJuSyI2Z2CwtrJTVwc6D8HihC1PikpaDZ2sZNpgCvW54d9RLlDEEMFuXV8 bW8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692778604; x=1693383404; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MWjgYqFH/puginbhc/skfntsNw0PGNca+fvZbWLNLto=; b=kdzy0IlFuY5Ayd0rNadYRTIlUxp28/xegyOiu0TG/Nhc1I+3ZWL4Y5lXOPGBzoCn5r udPUODGB5KwJM6+gGTRmE8fiZiV0geNn1xS+rWnhke/ciJ9aNU4Tw5erggl0ew48IILi vyugvO5BjodC/f9+fdV1fk1R1bbixvJrfVrWOIxmviQNoN2YiglE4NdyHHLMZKnj99Z6 h282gmzwjiP3zfwd929nUY1oHvWLZzPW4wLuHsZD2YiW1GrwQtELeEKcQXSHWzFRA52q NVxWXfWvyHyLsneRySO6X5KbYO1jwAcsCXAqio84Q0P5+IL3cHFes+b0mV3RHo0RS4E2 pY1A== X-Gm-Message-State: AOJu0Ywf7OEMU4rm9ROGUbm8q+E0SwbO9Qd4cnR9GFTZBCo2hdtCMBtt 2ybbrJPeEOjcBIktBNtEF19s60dUKbEFornBLRE= X-Google-Smtp-Source: AGHT+IFLY3C1XI9nBTbv1zPkQQZaOR38CF4L0Wbp508SCqiS4w3hWjiEYtKcSdgK2Z6dojxjl34psVR5mhAHzTH+Urw= X-Received: by 2002:a81:9a8e:0:b0:589:f494:3e42 with SMTP id r136-20020a819a8e000000b00589f4943e42mr11028325ywg.40.1692778604605; Wed, 23 Aug 2023 01:16:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 23 Aug 2023 11:16:25 +0300 Message-ID: To: chopins xiao Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000006936d3060392bb11" Subject: Re: [PHP-DEV] Replace ugly attribute token #[] to other From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --0000000000006936d3060392bb11 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 23, 2023 at 9:36=E2=80=AFAM chopins xiao wrote: > I use @ instead of #[] as attribute token. attribute use whitespace marks > are closed. Of course you can start with @@ or #, other. > error control use @@ instead of @, add T_SILENCE token > > > > my implemented: > https://github.com/chopins/php-src/tree/new-syntax/attribute > > > Other new syntax implemented (Verification of feasibility) : > > https://github.com/chopins/php-src/blob/php-alternative-syntax/alternativ= e-syntax.md > > > Regards > Chopin Xiao > Hey Chopin You can check: https://wiki.php.net/rfc/attributes_v2, that initially implemented it with <> https://wiki.php.net/rfc/shorter_attribute_syntax, that changed the syntax to @@Attribute https://wiki.php.net/rfc/shorter_attribute_syntax_change, that finally changed the syntax to #[Attribute] In time, the last syntax proved to be good, especially when dealing with code that must run as well on PHP versions before PHP 8.0, as it's interpreted there as a comment. All I can see right now are a lot of backward incompatible changes that are unlikely to be accepted with no clear gains. Please consider them, so that there is a clear upgrade path for existing codebase. Regards, Alex --0000000000006936d3060392bb11--