Decorators for functions

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


Drive-by-comment:

On 20 October 2015 at 14:40, Bob Myers <rtm at gol.com> 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.

/Andreas


More information about the es-discuss mailing list