Lexical Closures are Handy
I wrote previously that I would write about a handy trick in JavaScript known as a “lexical closure”. This article has a great definition of a lexical closure: http://www.brockman.se/writing/method-references.html.utf8. I quote… Essentially, a closure, or lexical closure, is a function f coupled with a snapshot of its lexical environment (i.e., the non-local variable bindings used [...]
JavaScript Scope Blues
I’ve been working out some methods of making uniquely namespaced JavaScript objects. I’m trying to handle a situation where there could be multiple instances of the same object or functions on the same page with the same name. The idea is to prevent one function, variable, or object accidentally writing over another because they have [...]
Weekend Round-up
Just when I thought “A List Apart” had become a useless dried up husk of RoR wankers, they turn around and publish this gem of an article: Getting Out of Binding Situations in JavaScript I’ve read various descriptions of ‘binding’ in JavaScript before, but this is probably the most clear explanation I’ve seen. As a [...]
The Greatest Comment Ever Commented
On the Metafilter there is a lengthy thread discussing the new Pixar flick Wall*E (and the critical response thereof). One comment is an incredible story about how a girl, a video, and the resulting wrap party in San Francisco. The comment opens with “Here’s a true story about how awesome Pixar is.” And it’s perfectly [...]
Michael Barrett