7
votes
3answers
891 views

What common programming problems are best solved by using prototypes and closures?

As much as I understand both concepts, I can't see how can I take advantage of JavaScript's closures and prototypes aside from using them for creating instantiable and/or encapsulated class-like ...
4
votes
1answer
858 views

what are the benefits of closure, primarily for PHP?

I am beginning the process of moving code over to PHP 5.3 and one of the most highly touted features of PHP 5.3 is the ability to use closures. My understanding of closures is that they allow ...
47
votes
9answers
14k views

What is a closure?

Every now and then I see "closures" being mentioned, and I tried looking it up but Wiki doesn't give an explanation that I understand. Could someone help me out here?