« first day (1940 days earlier)      last day (3011 days later) » 
01:00 - 23:0023:00 - 00:00

11:02 PM
@Zirak Well, I saw what I expected in the end: only free variables being bound in a closure, and no reference to the entire outer lexical scope.
 
Sorry, I don't get it. What would you have liked to have happened? What's missing? What's an alternative behaviour?
 
@Zirak Well, just @ŠimeVidas's question about being able to view the outer scope. I presume that's what he meant since if you've used free variables to capture stuff from the outer scope then the question is moot.
 
Again, I don't get your intention. Care to give an example of the alternative?
 
I don't know of an alternative :-D That's kinda my point: the debugger doesn't show entire outer scope (which is what I thought @ŠimeVidas wanted, I might be wrong), just captured free variables.
 
hrngh, what do you mean by "entire outer scope"?
What should the debugger show if it did capture the "entire outer scope"?
Don't explain please, exemplify. I want examples.
 
11:12 PM
E.g. var a, b in outer function, only a referenced in inner function which gets returned from outer function. Only a is captured (as I'd expect) even though b was in scope at the time. At least that's what devtools in Chrome shows.
 
13 mins ago, by Zirak
Some things get optimised away, which is a common gotcha
So yes, I concede
 
Well, I thought that's how closures in general were meant to work, rather than being an optimisation as such. Though ES2015 does imply that the entire outer scope is captured irrespective of the presence of free variables, in which case it would be an optimisation as you say.
 
11:27 PM
it's a debugging optimisation
right? they only let you look up variables that you're using
annoying, but reasonable
 
I guess you could have fun with memory usage otherwise.
 
crl
!!> var foo=function(){}; foo.name
 
@crl ""
@crl ""
 
crl
mm I thought there was something like that
 
user4883426
can anyone help me with this issue please? stackoverflow.com/questions/35214817/…
 
11:39 PM
!!> var foo=function foo (){}; foo.name
 
@phenomnomnominal "foo"
 
crl
ah, ok thanks
 
named functions have names
anonymous functions don't
 
crl
!!> var o = { method(){} }; o.method.name
 
@crl "method"
 
11:55 PM
lel the room title
 
crl
a bit presumptuous :) but fine
 
01:00 - 23:0023:00 - 00:00

« first day (1940 days earlier)      last day (3011 days later) »