Read only if you know Javascript…
…otherwise, your eyes will bleed. Really.
Anyway, I’ve been reading up on closures: http://jibbering.com/faq/faq_notes/closures.html
And it’s so painful. So painful that I thought I’d share it with you all.
Saturday, March 24th, 2007 : Web Development : 2 Comments
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
2 Responses to “Read only if you know Javascript…”
March 24th, 2007 at 6:21 pm
Cool. Perl also does closures; they act about the same. My favorite use for closures in perl was for pre-compiling complex regexes. If you have a really big regex (like several hundred patterns OR’ed together), then creating a function in a closure with that regex comparison can make the comparison run several hundred times faster.
March 24th, 2007 at 9:47 pm
When I was screwing around with interpreting wiki syntax in Javascript a few months ago, I was trying to figure out a way to get some of the more intense regexes to go faster…I wonder if this would have helped (it didn’t REALLY matter, as I was already in the 100ms range, but you know…ego and all.)