Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111626 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62609 invoked from network); 19 Aug 2020 10:11:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Aug 2020 10:11:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 07AD5180539 for ; Wed, 19 Aug 2020 02:13:01 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 ; Wed, 19 Aug 2020 02:13:00 -0700 (PDT) Received: by mail-wm1-f65.google.com with SMTP id k20so1387547wmi.5 for ; Wed, 19 Aug 2020 02:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JKCctQT5EoZPb8KnjrWIYrEe+UmZ70svEWguu5pu91U=; b=X6WzsJneEhBbr1kYf08ZTRQ9rx0gnEXZC0nWi0iuy8KT00lBv+fef2fjcAG38tvJYI NRXIPjqACEp94BI++IrrR5wuoA71rRWfrMH7Yk+R3VJRE1o1XlbFdkwa37P8LUl0H9DI epBODn7xJyw9Tf2cYMY3UckN3ZxX8BVZ+dlKmC546RJxFon2Xavwyk5ur1yuJtMiTiQz KU9nCNq8aPT+O7u1b9tTvByJWaAuYXVLgDXc88Mbi8ArXOVbwEv4u15ND4YlRBLclB2G gKDCQojs5j28HUT/BbgfOTA4jafAWs2VRGxqXJS09JXhdej0wDsNxbJIgVWIXDQIneNJ qpCg== 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=JKCctQT5EoZPb8KnjrWIYrEe+UmZ70svEWguu5pu91U=; b=N5HIR1lKWVXcBVza/vi79ZKXiZ2XlcxPDI9ywrLsV3jFnMBiohV1x+2wdBzHDcJ0gF c09sTrZHhh+H284oKZQvCy4/D/1Oc+D/dlKrRLS/TS23DgNU9/8w602hqLse2FJSGB+R AVRMc18Z8ombIsOLtkvYL9yzzobNdpQXwxXUlsga4Ao+uRgU+MdzsKqbwMWo6mAlGED7 ikPzstJH4I7Xkvp+k/HOJaGZ3lZ/XwnLnPEMm0m8gWZixOoUjn2PbHUp4mvTKS8MEAcU zdfQcYWTqFxW1a/U9iXLmmh7/Nmp4qnvwVc45wkvvUNZ0FKTTytV8QT6K+7lM1UYDOEy yHIw== X-Gm-Message-State: AOAM533JvCHfzpO/g1P8jXVKPy4+xqnjqFdaf4i64Y+OLSjf/Od/6ehq C8bHVNskg0WGflBZ5IxZ+4mSjg42UJgEA0k3ZyM48WH1V9KdPg== X-Google-Smtp-Source: ABdhPJzurnYvmmvXvV3RdGoIRiPsFkLvhjcsDSyXNYkDK0/aQTwocXIh7uDhdVJIgtcO7y0ghRJqhfCDuxmC3zTQsS4= X-Received: by 2002:a7b:c40b:: with SMTP id k11mr3933154wmi.107.1597828378893; Wed, 19 Aug 2020 02:12:58 -0700 (PDT) MIME-Version: 1.0 References: <642e48c2-eccc-19d8-99fd-888062a6232e@gmx.net> In-Reply-To: <642e48c2-eccc-19d8-99fd-888062a6232e@gmx.net> Date: Wed, 19 Aug 2020 11:12:47 +0200 Message-ID: To: Andreas Leathley Cc: Derick Rethans , PHP Developers Mailing List Content-Type: multipart/alternative; boundary="000000000000efb33505ad37686f" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: kontakt@beberlei.de (Benjamin Eberlei) --000000000000efb33505ad37686f Content-Type: text/plain; charset="UTF-8" On Wed, Aug 19, 2020 at 11:01 AM Andreas Leathley wrote: > On 19.08.20 10:47, Benjamin Eberlei wrote: > > One last change that I didn't see yesterday as it was on Github and not > > this list is the addition of another syntax proposal @{} with the same > > benefits as @[], a little more snowflake than compared to other > languages, > > but without the BC Break. > > I mentioned the benefits of @{} in an email to this list on Monday, with > the proposal to have both @@ and @{} as attribute syntax, so both camps > could have their syntax (one with delimiters, one without) with minimal > BC breaks, and leave the decision to the PHP developers/projects what > they prefer in what circumstances, because there can be valid reasons to > use both - I probably would use both. @{} could be good to define > multiple attributes for classes/properties, @@ could be good for short > attributes or ones very entrenched within the code, like function > parameters. The @{} syntax could be amended in the future, so this would > also be "future-proof". > > But I guess the division about syntax is too big at this point to > consider an approach where we just offer both types of syntax. From a > PHP developer viewpoint, it would be preferable though. > The "problem" with having both @@ and @{} would be that we would need two new tokens instead of one. We have a bunch of proposals that would support both grouped and ungrouped with the same syntax, so a solution that ends up ending two new tokens and syntaxes would be less preferable. With the choice being @@ or @{} - nothing would stop someone (not me ;-)) to make an RFC for 8.1 or later proposing to add a second syntax. --000000000000efb33505ad37686f--