Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111621 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53201 invoked from network); 19 Aug 2020 09:44:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Aug 2020 09:44:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7F9B31804AA for ; Wed, 19 Aug 2020 01:45:54 -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,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-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (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 01:45:53 -0700 (PDT) Received: by mail-wr1-f68.google.com with SMTP id p20so20690010wrf.0 for ; Wed, 19 Aug 2020 01:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld-be.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=lP9mU3nxuEVH4uYSPNjJjsO8lttaN8Oixhg9ankUntw=; b=vTfkp+5UpMw6hNipxySizVVvN9DWjXrvE3pXSn0RyKNZk01Ge4f/msKH6Ir/F7WC3C r8cu5RrEOlrftvhZyAuqTa8QFfKcA8oOloHTimfPtjG6wYzo34D9gccd+gEL5aS0SSxd XfZ9/P+N8lveB5XVaHqJIS+K5BIKYIlfFJ2X5+TiVXOUz6YbTIwrFMvyN9LR4K7Kor8j 09PY3CnCs0htVt0mNFSZIBsmmtISBKOxbu0vGjJtfGHE2nPyQw8TaxKz+YSzIJccdgj7 tz2AwH1RznNgSI8XvursGFD5tAe2MWydNfhC2DQqvsCF8excYIH3mD9jqC6uxzzDV5b/ 2hXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=lP9mU3nxuEVH4uYSPNjJjsO8lttaN8Oixhg9ankUntw=; b=Rz01P1+azb1MN86foW+5zrN6qLxh9LA+MikC3/7QdscSkWgD67TQ4Uyrf/BbH9bBPo 4+U7jHAPrb3b9RHUV2RUZEISp8aCXOx2um2X6kh+wXmTZaCepTgB5Z6/t04MzosKaHye VQJOCfa7knTYXEWY5o0GAYghkjn0S6Tw+WMIZkEu8f/UgP5KtpuSFFy7dtbRmY7fNNC8 wPWl0VFaoyd2pIqkaA08NzfR3/gWKjTM+VClFO6aJ8QfZ+y0HxlVgnSE92NMjD8Zatpi uG7Nug28/PWsKqRE0xveWTQakofd/VAUQIpaSh/F4a4rKteZUAs8pQ/63oP9l8fJ1Kev XR4w== X-Gm-Message-State: AOAM5308SDkncnD+Uz98743GnNSQCq/rmI0hAjr1rmJhLDT1BCIpGW+F spaGwYXFmxCxeGOn24q59jmM20iLQCrxeQ== X-Google-Smtp-Source: ABdhPJwIxA7GMdB7ERLBRSGzRHt9mEPQRWMPsTYNSu0NxLp8phQIfAkeY/whgnK/d2V2nGzL/48S/g== X-Received: by 2002:adf:91a1:: with SMTP id 30mr25868291wri.29.1597826750369; Wed, 19 Aug 2020 01:45:50 -0700 (PDT) Received: from [192.168.2.171] (194.57.150.83.ftth.as8758.net. [83.150.57.194]) by smtp.gmail.com with ESMTPSA id j4sm4140792wmi.48.2020.08.19.01.45.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Aug 2020 01:45:49 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Wed, 19 Aug 2020 10:45:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: j.boggiano@seld.be (Jordi Boggiano) Hi, On 18/08/2020 20:00, Benjamin Eberlei wrote: > > https://wiki.php.net/rfc/shorter_attribute_syntax_change > > I have updated the RFC one last time with as much of the feedback as > possible: > > - a section about comparing to complexity of type definitions > - removal of the machine reading section as too narrow and ultimately not > that important as downstream libraries just have to deal with any of it > - some more nuances in forward compatibility pro/cons section of #[] > - smaller corrections and improvements. > > I don't think something major is missing now. Thanks for the updates Benjamin. Just to mention something here in a bit more depth because it is easy to overlook in the RFC if you have looked at it a lot. In "Potential Future Benefits of Enclosed Delimiter Syntax" there is an addition of an example using an attribute for an AOP-style before-function callback:     @:Before(fn ($x) => $x*4) IMO this is much more readable and self-documenting than a dangling lambda like @[fn ($x) => %x*4], as the attribute name hints at what is going on, and it provides enclosure with the arg list (). I hope this will address the worries that the shorter @@/@: syntaxes would prevent us from adding some features later based on a lack of end delimiter, as it was the only objective technical argument in favor of #[]/@[]. Now it's IMO all about what syntax people prefer visually.. Best, Jordi -- Jordi Boggiano @seldaek - https://seld.be