|
|
|
|
|
by Udo
4396 days ago
|
|
I think you misunderstand what I'm trying to say. The point is not that x should be out of scope (why would it be?) The original assertion by curveship was that the outer context is not kept alive for the function, and that f() only gets access to the variables it explicitly imports from the outer context. And I thought this might be wrong, so I cooked up the example. Again, this is not about scope. This is about the fact that the function itself keeps a reference to the entire context it was created in, as opposed to just the things it explicitly imports. In this, it appears, Javascript works exactly as Ruby, which again makes the entire outer context available through the binding facility. I'm sorry if that wasn't clear from my description. |
|