Decorators for functions
jbondc at gdesolutions.com
Thu Oct 22 16:20:21 UTC 2015
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).
More information about the es-discuss