Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111587 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83669 invoked from network); 17 Aug 2020 16:22:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Aug 2020 16:22:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4EF8C180549 for ; Mon, 17 Aug 2020 08:23:05 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 17 Aug 2020 08:23:04 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 770E35C0190 for ; Mon, 17 Aug 2020 11:23:04 -0400 (EDT) Received: from imap26 ([10.202.2.76]) by compute7.internal (MEProxy); Mon, 17 Aug 2020 11:23:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=S+oHKR/Q0zOxQSupljy1OIyFlDd0hQwD4cFXohSQ/ oI=; b=r6CVk8SfJyOytppqaKrNSZ5XBYio3iFPBddikP7WjcyZc59/Sn5Bq8sVQ MnIn2894TZnDpGlsAGyh6Q/54X0mUdWRBm+eOyzqefwrJ1UNSouhKB3JJpXIXdFv ivlbg9+jqXCeW19V+hSPb7B3lauPFHtbzATOpp+1QDEsIK8e1e88uY5fyhA46+4v qgCHiQ5+JwV8VE6bcku7fcP5QWqsUl7wKdh5mUzgFTAxELQkxeFpR7WlwSGWbCYH of3O41kWwgKdDNnva35oKddLwsB2y6SUD7qE92X99P02L7aNUpBmTTpGpEVum7w5 2YhK83hyrPbMwd1DK8xGRAczdy5kA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddtfedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0BFA714200A2; Mon, 17 Aug 2020 11:23:04 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-192-gd9d7a78-fm-20200816.001-gd9d7a786 Mime-Version: 1.0 Message-ID: <2309a26a-1a9f-4fde-84a3-f6a77531501a@www.fastmail.com> In-Reply-To: <5bb74053737eeccb061b1b0df79b2e6b6c4ea91658b7b0e53af6ab780ecf1eb7@mahalux.com> References: <4fae771b-7e02-f34d-48b2-345d7c0cb09f@gmx.net> <5bb74053737eeccb061b1b0df79b2e6b6c4ea91658b7b0e53af6ab780ecf1eb7@mahalux.com> Date: Mon, 17 Aug 2020 10:22:28 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: larry@garfieldtech.com ("Larry Garfield") On Mon, Aug 17, 2020, at 7:30 AM, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8C= VUT FEL wrote: > > possibility to keep @@ and add @{} as a second syntax for attributes= >=20 > +1, but I would keep same prefix, ie. @@{} (or @@[]), for both syntaxe= s, > it is much easier for human eyes to search for one thing, also easier > for grep=20 >=20 > On 17 Aug 2020 12:48, Andreas Leathley wrote: >=20 > > As a possible addition/discussion point, I only noticed today that @= {} > > is a syntax that has not been mentioned yet, also not in any previou= s > > discussions about attributes as far as I can tell. @{} currently lea= ds > > to a syntax error, so there is no BC break, and {} is common syntax = for > > grouping expressions in PHP, much more so than [], which is an > > array-specific syntax. > >=20 > > Would it be a possibility to keep @@ and add @{} as a second syntax = for > > attributes, that can be used for grouping (for situations where that= > > makes sense) or other possibly future extensions? Then @@ would be a= > > good syntax for simple attribute definitions, and @{} could be an > > alternative for people who want to group them or if any more complex= > > attribute features are added to the language later. > >=20 > > Because both sides of the "ending delimiter or no ending delimiter" > > discussion do have some points in their favor, and it seems quite > > individual what each person prefers. For a language it could be > > beneficial to give some choices to the developer instead of foreseei= ng > > each individual use case, and maybe attributes is such a feature. > >=20 > > I previously thought about suggesting both types of syntax (with and= > > without delimiters), but felt the current options all have too many = side > > effects to choose "two side effects" or two BC breaks. But the @@ BC= > > break seems the most harmless BC break of the bunch, and @{} does no= t > > have a BC break, so these two option might be good together. Supporting both @@Foo and @@{ Foo } sounds really nice on the surface as= a compromise, but runs into the problem of any 3rd party parsers now ne= eding to do extra work as well. Minimizing work for 3rd party parsers i= s one of the main goals under discussion, as I understand it. I'm not s= ure it's viable, therefore, much as it does have its appeal conceptually= . --Larry Garfield