Well, I think that having closing over a method close over `this` is actually right and I don't think it would actually break anything. (I believe the ActionScript extension applies _only_ to methods; and methods _do_ have a free reference to this. Really all they have done is made it so that if you close over a method `foo`, that you can invoke it as `foo()` and not have this be `null`.)

On 1 Dec 2005, at 11:51, Neil Mix wrote:

Wow. I'm stunned. Is it possible for the compiler do the right tricks in order to maintain x-platform compatibility within LZX? I know this is still a long way off, I'm just curious.

On Dec 1, 2005, at 9:59 AM, P T Withington wrote:

On 1 Dec 2005, at 10:43, Neil Mix wrote:


off-topic: P.T., if I understand you correctly, in swf9 the "this" that is present when a function is defined is what gets used when the function is executed? I've never seen a browser JavaScript implementation do that -- it seems that would break the language in some pretty fundamental ways.


It _is_ a deviation from Javascript. It is a Macromedia extension (perhaps taken from the Javascript 2 proposal?), specifically intended to eliminate the need for delegates. It applies to closed over methods only. Cf. http://labs.macromedia.com/wiki/ index.php/ActionScript_3:overview (and search for 'closure').
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to