Last night I stayed up late reading Learning Python. Most of it was ordinary programming stuff — “This is a function” — but here are the three things that got me excited and almost gave me goosebumps. First, being able to return tuples from a function (so you can return multiple values from a single function). Wow. Second, map(), which lets you run a specified function on a list. (It’s equivalent to iterating through the list and calling the function manually, but much cooler.) Third, lambdas. Hmm, how can I describe lambdas? In-line functions? That’s not a very useful description per se, but oh well. :) Apparently lambdas are one of the things that make Lisp so cool, and I can see why. I’ve been reading about metaprogramming and it looks quite interesting (and ESR mentions it in his article, linked to in my last post). Yum. :)
I doubt I’ll ever go back to C now. :)
[tags]Python, Lisp[/tags]

[...] Ben Crowder is trying out Python and seems to like it quite a bit: Last night I stayed up late reading Learning Python. Most of it was ordinary programming stuff — “This is a function” — but here are the three things that got me excited and almost gave me goosebumps… [...]