December 29, 2014

On Closures

Recently, I’ve been something of a language evangelist at work. I’ve been promoting the power and utility of Python and Javascript to both coworkers and management. One thing I’ve found difficult to get across to them is the concept of "Closures", and why the lack of Closures in many mainstream languages (such as Java) is an irritating, slowing, nuisance.

I use them all the time, yet it is not so simple to explain why they are, to phrase it the way my son would, "So Sweet". I would go so far as to say that if you aren’t using closures all over the place in Javascript you probably dislike Javascript and think it is a toy suitable only for web designers. Seriously, closures are what turned me into a Javascript fan, that and the incredible Prototype library. In Python, closures are natural, yet frightening for so many who come from a Java or C++ background.

This article won’t teach you everything about Closures, and it is written using Ruby as an example, but it may show you why you would want to try them. Thanks, Tom Moertel, and Reddit.

link: Closures and the Professional Programmer

Share and Enjoy:
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures
  • services sprite On Closures

Related posts:

  1. AJAX goodness for Invisible Castle I just rolled my first real AJAX application out to...

About Bruce Kroeze

Speak Your Mind

*