Decorators for functions

Andreas Rossberg rossberg at
Tue Oct 20 13:35:27 UTC 2015


On 20 October 2015 at 14:40, Bob Myers <rtm at> wrote:
> AFAICS, hoisting is not an issue if the decorator has no side effects.

Not so. Initialisation order is another issue. Consider:

  var x = 0
  @bla(x) function f() {}

Also, as a side note, pretty much *everything* in JavaScript
potentially has side effects.


More information about the es-discuss mailing list