On Wed, 19 Aug 2020 at 09:46, Jordi Boggiano <j.boggi...@seld.be> 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

Reply via email to