Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111569 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19707 invoked from network); 17 Aug 2020 09:10:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Aug 2020 09:10:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C82491804AA for ; Mon, 17 Aug 2020 01:11:27 -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-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.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 ; Mon, 17 Aug 2020 01:11:27 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id g13so2478369ioo.9 for ; Mon, 17 Aug 2020 01:11:27 -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=aSev8HP/e92X4hAuLytwPIqbCtSzhur0/ppXEenGnSg=; b=OR5hiqYxqzA8Oboi+OTS9H0rJMGyOlGPEDKl7fuL4b2iHFC99Apb9YSbd2Ctbf4eEt syGR/NBYT2U/h37GMbiHO3S3gNBvLrexpw5gmHVi1BwTPkDXv4NMuR/Ut6db7eed7nnD ct4L44cY9ku72ouohs/Rwxzso8P0fwZEPPEba8yXMMWNa0yxprnkLmLLAO3zPCvLuf0j nhMVL3z9zlXvh61YjHed8FuP3iSxTvPBV7pE0MPMfjhFPREUZ+HF7FEYaksoYKzn3cLF T5eMGyZo9kip/+nVghRl3QV2vg3XR4Fft9YcnsFsk0JkAKWzizZPv9Daqa4Ey5S+Tp5G zTtg== 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=aSev8HP/e92X4hAuLytwPIqbCtSzhur0/ppXEenGnSg=; b=kCwV9X+pgMx3Auo9HggbhOT7rTLQAA7zQ7J5Bl/KT0cR85SufwinenzS7XUid0LPMF U9vcEk/0TU2MZcIposj3fWaayt0vFRNFGKmoPXWXKJy8d/6Pv7N+DCrB4lz4LmqyszIj wu5rsZoIX+0hPBXruNe/cQD3HWe55k2c/zY2UPqRpnH0eTZF58logF4jjNyetKrgfr5h y213T2PrQmdRwFv7voJeyIyGz/kb7r5Hu/SIwAGUO72+AC2eGqBMw3D4qWbNXb1UgfT9 ltX/a/bFH9/5goPv5xVnTaoZkO+vzKezek1h4QUnPeZyloaGlaRrJMdzNihAYZgiyYtE u1Ew== X-Gm-Message-State: AOAM531gsiJIxV1mOnqd25yD68ALGfvzehSCZdiYHJrLEq0H0Mg5IeJ6 IIorOb23drY1LGwd0a/kFkxTHXZ+QIU= X-Google-Smtp-Source: ABdhPJy4MeKCo00mT1NvMSgSgG/CL9b45TIy01w6sY6d68btJs9zQa1ZRhLM2PwbBFDMEXUYBUN61g== X-Received: by 2002:a6b:8b86:: with SMTP id n128mr11439354iod.202.1597651885724; Mon, 17 Aug 2020 01:11:25 -0700 (PDT) Received: from mail-il1-f174.google.com (mail-il1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id y8sm8811029iom.26.2020.08.17.01.11.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 01:11:24 -0700 (PDT) Received: by mail-il1-f174.google.com with SMTP id r13so9327134iln.0 for ; Mon, 17 Aug 2020 01:11:24 -0700 (PDT) X-Received: by 2002:a92:8902:: with SMTP id n2mr6569893ild.97.1597651884089; Mon, 17 Aug 2020 01:11:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 17 Aug 2020 09:10:48 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Theodore Brown Cc: Benjamin Eberlei , Derick Rethans , PHP Developers Mailing List Content-Type: multipart/alternative; boundary="00000000000006c37c05ad0e5145" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: phpmailinglists@gmail.com (Peter Bowyer) --00000000000006c37c05ad0e5145 Content-Type: text/plain; charset="UTF-8" On Mon, 17 Aug 2020 at 02:06, Theodore Brown wrote: > ## Forcing @@ attributes to end with parenthesis? > > I don't really see the point of this section in the RFC. The blame for that is on me, not Benjamin and Derek, as I repeatedly asked why a compulsory ) could not be considered a closing delimiter. > ## Attribute nesting > > The RFC points out that all the syntaxes can allow attribute nesting, > which is true. However, it would be nice to include an example of > potential future nesting for each syntax, as was included in the > original Shorter Attribute Syntax RFC. The reason is that some of the > syntaxes are less readable than others when nested (particularly `<<>>`, > though arguably `#[]` and `@[]` as well since the attribute end > delimiter can be confused with the end bracket of an array argument. > > @@JoinTable( > "User_Group", > @@JoinColumn("User_id", "id"), > @@JoinColumn("Group_id", "id"), > ) > private $groups; > > #[JoinTable( > "User_Group", > #[JoinColumn("User_id", "id")], > #[JoinColumn("Group_id", "id")], > )] > private $groups; > > @[JoinTable( > "User_Group", > @[JoinColumn("User_id", "id")], > @[JoinColumn("Group_id", "id")], > )] > private $groups; > > < "User_Group", > <>, > <>, > )>> > private $groups; > > @:JoinTable( > "User_Group", > @:JoinColumn("User_id", "id"), > @:JoinColumn("Group_id", "id"), > ) > private $groups; > Good catch. Peter --00000000000006c37c05ad0e5145--