Re:Show HN: React-decoration – A collection of decorators fo...
by maxthegeek1 on Saturday October 29, 2016 @08:14PM
(#12827293)
Decorator's shouldn't be a part of javascript when function composition serves the same purpose without adding additional syntax.
[ Parent
| on HN ]
Re:Show HN: React-decoration – A collection of decorators fo...
by acjohnson55 on Sunday October 30, 2016 @01:05AM
(#12828262)
To play Devil's advocate, function composition can accomplish literally anything that's conputable, and principle of least power would suggest that having specific and limited syntax for common patterns is productive.
If Javascript continues to admit statement-based syntax, I think decorators are appropriate, because they allow the functional decorator pattern to be applied to function (and method, and class) declarations.
Re:Show HN: React-decoration – A collection of decorators fo...
by olalonde on Sunday October 30, 2016 @01:35AM
(#12828327)
Most of the things that were introduced in ES6 were already possible without adding additional syntax (classes, arrow functions, etc.).
Re:Show HN: React-decoration – A collection of decorators fo...
by dismantlethesun on Sunday October 30, 2016 @06:37AM
(#12829056)
Function composition is so common it deserves its own syntax.