Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111629 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68005 invoked from network); 19 Aug 2020 10:35:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Aug 2020 10:35:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D16E91804AC for ; Wed, 19 Aug 2020 02:36:50 -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-f68.google.com (mail-io1-f68.google.com [209.85.166.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 02:36:50 -0700 (PDT) Received: by mail-io1-f68.google.com with SMTP id q75so24127899iod.1 for ; Wed, 19 Aug 2020 02:36:50 -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=74H4D7RqR1NSiZmNmWCeCuRU8IjgdXWghZp10kThrFw=; b=iEBx9CvpnORADloZcheI6boOz/+oqhZ7KeHMSst8SB0EtNrL2skZcuIgFV0vjL2Fic OocIVzlqHcPifFfmTXsoY/pDodzKFr016lH6v4LlgCbtadkVRycF7ngcafNrMRPrkuVh Tn9Qt0tvXiWIQGCh1LRyxRlcQfT1eoKu+6HEPlkKqBPQgvSy/Jcxjnmb4+IIndCSI986 8LUls8gRKwylpo5jcPyCcpW5crfk9i2H9qqpiL5HV3bapRVm3rABl/MpCvDl5j0lbaGD PykYnwe1j5ppbUyU31RPpdCnO/E6AuGiSMjHOrROnSJDhilngvO9RHhJBpejF9eI+2y7 OlKg== 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=74H4D7RqR1NSiZmNmWCeCuRU8IjgdXWghZp10kThrFw=; b=qEnT6ZUD7eBmTB+VUJWBMn0B2kn7bhc+YoCdEP7R9ZaAqUgPbIhkNsy3QGmAA9K2u+ ieoBwEuE0sBXPk0+0AjmD82Oe3pBUImTzisODy4k8s2qeyajvVY8R3JpIG7Vcs7iqSqe hXfLhmoMcWDnKGZ4zaVo+8adCZciDr5C3Nwlm+KfCMuS/RQLpxqz7/4N12a205r0Aoj5 ICUGe5NMazQyA9TQBi9YTD7lfzDmWb8+u5KJ0U3A3/nUXgTEHmeN1qS//RRT5T9bwpg9 7zrtCuLTFXF14lUEITcYe3goufCxWHGzIZA2EqSsq9OFaZ/3pmb8xddQnuQZvq4IUBUM mcBQ== X-Gm-Message-State: AOAM532HIpJzwIdIdtLrRTghvmqlO4BJy1YKGGB10jeV3hn7xzog48T6 zGC2jS2TdenJAiyPgKdBdqCjspqfCNk= X-Google-Smtp-Source: ABdhPJzeRCw6BIOdmFXrDTif7kQtdwkAY7KWvnngNhnVP8D3FSNcyfhv7/FkO2TNfneIjBtWZC4/vw== X-Received: by 2002:a6b:bc82:: with SMTP id m124mr19818620iof.172.1597829806206; Wed, 19 Aug 2020 02:36:46 -0700 (PDT) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id c16sm4911335ila.29.2020.08.19.02.36.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Aug 2020 02:36:45 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id j9so20072385ilc.11 for ; Wed, 19 Aug 2020 02:36:45 -0700 (PDT) X-Received: by 2002:a92:89c8:: with SMTP id w69mr5886216ilk.139.1597829804913; Wed, 19 Aug 2020 02:36:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 19 Aug 2020 10:36:09 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Jordi Boggiano Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000ef16c005ad37bdb0" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: phpmailinglists@gmail.com (Peter Bowyer) --000000000000ef16c005ad37bdb0 Content-Type: text/plain; charset="UTF-8" On Wed, 19 Aug 2020 at 09:46, Jordi Boggiano wrote: > 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 read a lot of code I didn't write, and I like your example. It is much more readable and self-documenting. Peter --000000000000ef16c005ad37bdb0--