Decorators for functions
andrea.giammarchi at gmail.com
Tue Oct 20 10:33:55 UTC 2015
You haven't provided a single use-case example, like how are you going to
decorate a function or why.
IMO if implemented it will be incompatible with non ES6 code unable to
distinguish between classes and functions unless fully transpiled, making
decorators less portable.
One thing I like about current state is that you can use decorators even in
ES5 browsers 
Just my 2 cents, Regards
 as shown in the second example of the universal mixin module
On Tue, Oct 20, 2015 at 10:30 AM, Axel Rauschmayer <rauschma at icloud.com>
> The decorator proposal does not include decorators for functions, because
> it isn’t clear how to make them work in the face of hoisting.
> However, it would be great to have them. I see two possible solutions:
> – A decorator on a function declaration prevents hoisting.
> – Enable decorators for function expressions, arrow functions and
> generator function expressions.
> Does either one of those make sense?
> Dr. Axel Rauschmayer
> axel at rauschma.de
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss