Go Fly a Kite! »
« Memes and Asian pop music

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…”

  1. Michael Says:

    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.


  2. SoulGook Says:

    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.)


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>