Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120924 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72706 invoked from network); 23 Aug 2023 07:47:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Aug 2023 07:47:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F12521804AA for ; Wed, 23 Aug 2023 00:47: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=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR,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-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (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 00:47:45 -0700 (PDT) Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-34ca860051fso10402145ab.2 for ; Wed, 23 Aug 2023 00:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692776865; x=1693381665; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nJrVpgAgsBWkRmVCvBHNKWuYuRRrmynKvHfajUc94XE=; b=D0mVKaWqvCJiymhUkyCjN19hLnxftA0j0g2qgwLgRNb/K4i7znGa7hEQchdnnFGP31 mmExBMippAdx7RqWAc70L1nv6cs008joepqJXWZbdLCF9OI8ubK0tiRlzuxxloPqskOH sJYLz0GdEwlrcC/hvKe3/f1p+FB0aAu4RFKnQdgYDHXMiebNH3/0H39wxUPtnzPBYB1C d0YbnWLg+Sxin7XRZvGajHi2I+obKatJ8spoe3AKkokbls0RgV/RuXfbxkh8mxneKZQe y5MR6cihr2RM3uk+GwrFn8R9KeuHvSVygBSjD/IjZ0sm5irBTQu6YCeA7mxCLUt9RWtf 0dxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692776865; x=1693381665; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nJrVpgAgsBWkRmVCvBHNKWuYuRRrmynKvHfajUc94XE=; b=PLmAOZqvc+9ECqU1FLoMPMHNC1OlADMbeGUrazTz99r2f33yY20Vt7dCS4JP8+Z+LD 6f09NeTuGH+HxOsvdWHyrzH+PoPFM2Cc/fcXRQtcXsabNNBW0vmPlUATfhKojQwokN9C ZG4wDt2fgt8Z47SawlnKISB4/n2suFHXU30xwZYHEkMk16ZgVZ3/MUkedQHFDNAnFGWd L21uFxSjyuHC7Gc0Gc51KRsuXUkwwvJWHAD/B3fQbtXxTqVMwQmMl64/lqXkq3jCpUfI /jLpRckAjw8NkKm0blR51gDW0VX6BO1nLccq/C+nTdp/w/LZ1DPD5WZfbiaSHUkw2TFN HasQ== X-Gm-Message-State: AOJu0YwaPjarg+L4jiu5WgORnd1kVMfGweY8z5uhWEfmIPOzDCjUdTyw dY0Q0G0hDVsPqJTLqOAjkQG98IuDG+/o01XjwtY= X-Google-Smtp-Source: AGHT+IHY4q/Ak1HS48YJqKAcP0ZUOoW53kIXl6DZ+Bhryb54aD5xxqigktl05ijd9j1U0oWmM+HO97wIdHO4f3y0djM= X-Received: by 2002:a05:6e02:1bc3:b0:34c:cb72:32f7 with SMTP id x3-20020a056e021bc300b0034ccb7232f7mr85693ilv.24.1692776864772; Wed, 23 Aug 2023 00:47:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ad5:5288:0:b0:2e8:64dc:48e2 with HTTP; Wed, 23 Aug 2023 00:47:44 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Aug 2023 09:47:44 +0200 Message-ID: To: chopins xiao Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Replace ugly attribute token #[] to other From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2023-08-23 8:35 GMT+02:00, chopins xiao : > 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 > > new syntax: > one attribute: @attribute{WHITESPACE} @otherAttribute(12){WHITESPACE} > group attribute: @attribute1(1, 2),attribute2(343, > 43)@attibute3(33)[WHITESPACE] > > current syntax: > one attribute: #[attribute()] #[otherAttribute()] > group attribute: #[attribute1(1, 2),attribute2(343,),attibute3(33)] > > below is comparison > new syntax: > > @AttrA@AttrB(112, 334),AttrC > @AttrD > class A { > =E2=80=82@AttrE > =E2=80=82@AttrF @AttrG > =E2=80=82public $a; > =E2=80=82@AttrM > public function m1(@AttrParma(1) $c) {} > } > > $ab =3D @fn(1) fn()=3D> 1+2; > ----------- > current syntax: > > #[AttrA,AttrB(112, 334),AttrC] > #[AttrD] > class A { > =E2=80=82#[AttrE] > =E2=80=82#[AttrF] #[AttrG] > =E2=80=82public $a; > =E2=80=82#[AttrM] > public function m1(#[AttrParma(1)] $c) {} > } > $ab =3D #[fn(1)] fn()=3D>1+2; > > 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 > I think this was debated extensively already. :) It's unlikely to change. Olle