On 06/01/12 11:45 AM, Robert Smith wrote:
On 1/5/2012 9:26 PM, Toby Thain wrote:
On 05/01/12 12:09 PM, Liam Proven wrote:
...
Closures: again, I have yet to find a readable, comprehensible
explanation of what they are, what they are good for, why they are
powerful and what strengths they confer onto a programming language.
...
The
best way to go about it is to actually write some programs in Scheme
or Standard ML or Haskell or whatever. Then you actually internalize
what things mean, instead of these abstract definitions like what the
semantics of lambda is. You'll find the easy-to-understand books
typically do the programming for you by showing you code examples.
The Crockford book - "JavaScript: The Good Parts" - is a good example of
this. JavaScript would be much less powerful and more horrible without
closures. Millions of people use them in code every day without
hand-wringing.
(Not forgetting the analogies that one can demonstrate between *objects*
and closures - yet who's now crying FUD over objects? Before that it was
POINTERS ARE TOO HARD.)
An interesting question, now that closures are practically normal, is
"what's next?" :D
--T
Remember, programming isn't like history, where you can just read a book
and understand what's going on. It's more like medicine and being a
doctor, where both book reading *and* practice are important, the latter
being almost surely more important.
--Robert
P.S., The moral of the story is, sit down, open a Scheme, and read SICP
from start to finish. It's not too difficult or too confusing, for it's
often the first book a compsci major gets to read.
READ SICP DAMMIT.