instance-bound and
type-constrained |this| methods
<lightbulb />
I have puzzled over the difference between defining an instance
method and a prototype method, maybe I finally see the light. What
you pointed out about the binding of this in the former and not the
latter was not obvious to me from the spec. Should it have been?
Are there other differences? What about instance vs. prototype for var? (Other than that you can dynamically change the prototype
value.)
On 2007-03-19, at 17:08 EDT, Brendan Eich wrote:
> instance-bound and
> type-constrained |this| methods
<lightbulb />
I have puzzled over the difference between defining an instance
method and a prototype method, maybe I finally see the light. What
you pointed out about the binding of `this` in the former and not the
latter was not obvious to me from the spec. Should it have been?
Are there other differences? What about instance vs. prototype for
`var`? (Other than that you can dynamically change the prototype
value.)
On 2007-03-19, at 17:08 EDT, Brendan Eich wrote:
<lightbulb />
I have puzzled over the difference between defining an instance
method and a prototype method, maybe I finally see the light. What
you pointed out about the binding of
this
in the former and not thelatter was not obvious to me from the spec. Should it have been?
Are there other differences? What about instance vs. prototype for
var
? (Other than that you can dynamically change the prototypevalue.)