Decorators for functions
rossberg at google.com
Fri Oct 23 11:33:10 UTC 2015
On 22 October 2015 at 18:20, Jonathan Bond-Caron
<jbondc at gdesolutions.com> 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):
Note that this patent indeed defines _declarative_ metadata
annotations. That's the exact opposite of the imperative decorator
proposal we are discussing right now, which completely conflates
computation level and meta level and thus is pretty much unusable for
> 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