Hey Josh,
Thanks for the rapid feedback.
> 1) I think we shoud be using the world handler instead of closure.
I'm fine with that - I've always referred to anonymous Function
definitions as closures. As often happens when I talk about
programming, I'm probably using the term incorrectly... :)
> 2) rather than __loomSetClosure, why not a namespace? loom::setClosure looks
> nicer to me, but that's mainly a matter of taste.
That's a good point. There's nothing stopping me from using a
namespace instead of an obfuscated method name, so I will head in that
direction instead. This will require the developer setting the closure
to use the namespace but that's hardly a big deal.
> 3) What happens for getter and setter functions? Is this exposed in
> MethodInvocation?
Getters and Setters are identical to methods from the AVM spec's
perspective, so they should play well with the existing proposal for
the interception API. The method name in the MethodInvocation will
just end up being the property name. Would it be useful to know if a
method invocation is a getter/setter? I can include that information
in the MethodInvocation object.
> 4) Also, vars? Can they be wrapped in get/set functions at run-time, the way
> MXMLC does at compile-time when encountering [Bindable]?
Hmm... yes, they could, but you might end up with potential conflicts.
I suppose we could take any public properties and replace them with
private properties wrapped by getters/setters that end up creating a
Loom invocation, which you could then intercept - what do you think? I
can't remember how AS3 responds if you take a property that was a
public var in the superclass and supersede (or subsede? :) ) it in a
subclass with a public property accessor; is that allowed? If so, that
sounds like a cool feature and I could definitely see this going in a
Loom point release.
Don't worry about being a pain - this is exactly the constructive
feedback I was hoping to get from you guys before the library goes
public.
Cheers,
- max
On Mar 26, 12:09 am, Josh McDonald <
j...@joshmcdonald.info> wrote:
> Hi Max,
>
> It's looking good mate :) A few thoughts:
>
> 1) I think we shoud be using the world handler instead of closure. You can't
> have a Function without a closure (or a closure without a Function) in
> ActionScript, but they're not really the same thing, and if I don't at least
> suggest a change, Ola Bini is gonna come looking for me :)
>
> 2) rather than __loomSetClosure, why not a namespace? loom::setClosure looks
> nicer to me, but that's mainly a matter of taste.
>
> 3) What happens for getter and setter functions? Is this exposed in
> MethodInvocation?
>
> 4) Also, vars? Can they be wrapped in get/set functions at run-time, the way
> MXMLC does at compile-time when encountering [Bindable]?
>
> I know, I'm a pain - but feedback it is :)
>
> Cheers,
> -Josh
>
> 2009/3/26 maxim.porges <
maxim.por...@gmail.com>
> -
j...@joshmcdonald.info