Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111937 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69844 invoked from network); 27 Sep 2020 11:04:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Sep 2020 11:04:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2FDE71804B7 for ; Sun, 27 Sep 2020 03:15:35 -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, 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-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (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 ; Sun, 27 Sep 2020 03:15:34 -0700 (PDT) Received: by mail-wm1-f67.google.com with SMTP id w2so3459638wmi.1 for ; Sun, 27 Sep 2020 03:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=ujsHtEkohewhjEH98ZGrNuzowdSxTz/tY2G94Alvnwk=; b=KfpYSNQJBIiLrm25H12uYP1Ctclns3K8dkPEMdVEiPjhRstuOkcS1Nw4CS3OfezZ8h OK3aDug9t1abXAI45J1yuiaUYhPGr8h8y2W10vV1KqM+00v9WMlpXHL8pP94TBREPfSA eGQdpUn1753ljUTFeh3LQ5OzFgtjyfJ2QTxq+1A2SRFqLykOJbAndyNZY2DePZ7CMWEX ys32lUb7a0/aaHJcc35jelj3wWRD0WtSBOxTyUwBxWs3/TuVFHtcgcbEYbZEx24mF8sp EdoNVNOlc55AEcezlZqf5gYDj6yCs4sDG9HC/j9kG6biTpbTwJlYzcFQNGLTHGjXhCzQ 2rCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=ujsHtEkohewhjEH98ZGrNuzowdSxTz/tY2G94Alvnwk=; b=PDFzurKzsuBKEfYSiSebsGHfAOQQ3KdXzkDUJwUnaUKEPXS1fmdL8qb4lWHfGW/Lub KQBFzkgnNaqtJFkpN6qtyTGWqKMUPOO44VjxNy6Bwiv9cWpy+HkKgD94O0WTbgOouUZs IxPPBOVcGCCpm5lZA9SRD/hvdBAchLXS5s/oBC/Wid45USkEAtm4NtdQnAd3Jf/vvWgQ BQTC7/IncZwY65y2xhkvlh2Bv2L7aG4G0QrTh4rpRhwIIzKCHQoDfMY5BLsL9Wur89O2 s8aCHyQhWVJ/jRn3yFmT2FiK401pO9hZ86GPa+mprlqMVbI3PUmg/WwbtyQBN5XTIf43 mBUA== X-Gm-Message-State: AOAM530XvmzRKJHU7IZ++vg/+bvxUsZ13Hzva63TrKHjzCiqzgL4d/8J WRca3xtgoBJfxFIxFUDSoaeeAwmxz/I= X-Google-Smtp-Source: ABdhPJwAKLY681Qrqujl6lwojb69P+FfTTXBM/gvr/5I+sXPlltI2WJjCX2dXbT21b/Zl0RosGFIZw== X-Received: by 2002:a1c:1983:: with SMTP id 125mr6293645wmz.29.1601201730885; Sun, 27 Sep 2020 03:15:30 -0700 (PDT) Received: from [192.168.0.12] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.gmail.com with ESMTPSA id h8sm8994393wrw.68.2020.09.27.03.15.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Sep 2020 03:15:30 -0700 (PDT) Date: Sun, 27 Sep 2020 11:15:28 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net Message-ID: Subject: Re: [PHP-DEV] List of attributes From: rowan.collins@gmail.com (Rowan Tommins) On 27 September 2020 09:22:48 BST, Nicolas Grekas wrote: >The A=2E syntax is consistent with the 1=2E list=2E >I feel like syntax B is not desired and could be confusing from a >grammar >pov=2E >BUT in syntax 2=2E, we allow an attribute to be unprefixed (bar), so that >syntax B is consistent with 2=2E I think it's fairly straightforward to see #[=2E=2E=2E] as meaning "list o= f attributes", rather than as "change meaning of all identifiers recursivel= y"=2E So, this will look for a constant "MAGIC", not a nested attribute: #[Foo(true, 42), Bar(MAGIC)] class X =2E=2E=2E Nested attributes are a slightly confusing concept anyway, because "normal= " attributes are always attached to something, but nested attributes occur = in place of a normal value=2E I can see their usefulness, but having the ex= tra #[=2E=2E=2E] to say "not a normal value, extra magic happening here" se= ems sensible=2E Presumably we could also allow grouping of nested attributes such that thi= s: #[Foo(#[Bar, Baz]) class X =2E=2E=2E Would just be equivalent to this: #[Foo([ #[Bar], #[Baz] ]) class X =2E=2E=2E Regards, --=20 Rowan Tommins [IMSoP]