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 [1]

Just my 2 cents, Regards


[1] as shown in the second example of the universal mixin module
https://github.com/WebReflection/universal-mixin#universal-mixin-

On Tue, Oct 20, 2015 at 10:30 AM, Axel Rauschmayer <[email protected]>
wrote:

> https://github.com/wycats/javascript-decorators/blob/master/README.md
>
> 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?
>
> Axel
>
> --
> Dr. Axel Rauschmayer
> [email protected]
> rauschma.de
>
>
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to