News for hackers. Stuff that matters.
Re:Teal – A statically-typed dialect of Lua by WorldMaker on Friday May 16, 2025 @03:00PM (#44008771)
> I feel like a lot of problems that decorators solve could also be solved with good ol’ higher order functions.

The Stage 3 version of decorators are mostly just a syntax sugar for higher-order function composition. (As opposed to the rejected at Stage 1 version that did a lot more "reflection" and type meta-magic.) I personally was rooting for the Pipeline composition operator to win out first over decorators as what I feel a more generally useful higher-order function composition tool, but I understand given Java/C#/Python how much more people seem to love the decorator syntax.

There are no comments on this comment yet.