Decorators for functions

Jordan Harband ljharb at
Thu Oct 22 17:25:56 UTC 2015

Andreas, thanks for correcting me on the optimization angle. I've been
under that impression for awhile.

Are you saying that to achieve the optimization I envision, we'd need
declarative syntax for descriptor properties (like enumerability etc),
rather than function calls? or would that also prevent optimizations?

On Thu, Oct 22, 2015 at 9:20 AM, Jonathan Bond-Caron <
jbondc at> wrote:

> On Thu Oct 22 07:44 AM, Andreas Rossberg wrote:
> > > determined at creation time, allowing for massive engine optimization,
> >
> Ya I'm not sure from which hat "massive engine optimization" comes from?
> What's meant is likely using decorators as annotations (compile time
> optimizations hints):
> Or 'ambient decorators':
> There's 2 patterns (maybe more?):
> (a) Tagging a 'tree transformation'  on a node.
> (b) Metadata at compile time on a node.
> The thing about (b) is it can easily live outside of the code (like in
> typescript where you have an optional header/declaration file)
> With (a), it seems more conservative to see how it gets used with classes
> before bolting on to functions (opinion: end result in java is not
> something to be proud of).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list