Re: function hoisting like var

2008-08-01 Thread Ingvar von Schoultz
Okay then, even shorter. Brendan Eich wrote: > But it is not what you proposed. In what way? Please be more specific, because I don't know what this supposed proposal of mine is. For example, those scope questions mention rebinding in a visible scope, midway through its code block, but that's

Re: How to escape implicit 'with (this)' of a method body

2008-08-01 Thread Brendan Eich
On Aug 1, 2008, at 2:43 PM, Garrett Smith wrote: > What is dynamically inserted? I guess would mean properties added to > an instance of a non-sealed class. Right. Those should not be addressable by unqualified names in method scope -- you have to use "this". >> so all references continue to b

Re: How to escape implicit 'with (this)' of a method body

2008-08-01 Thread Garrett Smith
On Fri, Aug 1, 2008 at 1:03 PM, Maciej Stachowiak <[EMAIL PROTECTED]> wrote: > > On Jul 31, 2008, at 5:24 AM, Dave Herman wrote: > >>> We should take this problem seriously. ... >>> >>> Dynamic scope is very bad. >> >> Specifically: >> >> - Classes are supposed to provide integrity, but dynamic sco

Re: How to escape implicit 'with (this)' of a method body

2008-08-01 Thread Maciej Stachowiak
On Jul 31, 2008, at 5:24 AM, Dave Herman wrote: >> We should take this problem seriously. ... >> >> Dynamic scope is very bad. > > Specifically: > > - Classes are supposed to provide integrity, but dynamic scope makes > the > internals of code brittle; any variable reference inside the > implem

Re: How to escape implicit 'with (this)' of a method body

2008-08-01 Thread Peter Hall
>> >> In AS3, the reference to bar in the zot function would be bound to >> this.bar > > I don't follow. There is no `this.bar` in the class where zot is defined. > Sorry, I said that backwards. When class foo is compiled, there is no member called bar, so the reference is bound to the global var