From: “Adam G.” [email protected]
I’ve decided to do as he suggests, but I’m unsure what I should start
with. Some languages I’m considering are:
- Lisp/Scheme
- Erlang
- Smalltalk
- C
I went on a spree recently and bought several books on Erlang, Haskell,
and Scheme.
“The Haskell School of Expression: Learning Functional Programming
through Multimedia” – Paul Hudak
“Purely Functional Data Structures” – Chris Okasaki
“Real World Haskell” – Bryan O’Sullivan
“Programming Erlang: Software for a Concurrent World” – Joe Armstrong
“The Scheme Programming Language, 3rd Edition” – R. Kent Dybvig
“The Little Schemer - 4th Edition” – Daniel P. Friedman
“The Seasoned Schemer” – Daniel P. Friedman
and also,
“JavaScript: The Good Parts” – Douglas Crockford
I’d been leaning toward Erlang because it’s being used in production
environments, and because of the accolades it gets for its
concurrency libraries / distributed computing capabilities.
I’d been leaning toward Scheme because I always wanted to learn
a Lisp dialect, with the code-is-data / metaprogramming / macro
syntax.
I’d been leaning toward Haskell because it is reputedly a notably
‘pure’ functional language, and apparently has some powerful
features in the way of type inferencing and lazy evaluation.
What finally tipped me toward Haskell, for now, was a couple
things over the past weekend. I was looking at amazon reviews
for Scheme books, for the third book in the “Little Schemer”
series, “The Reasoned Schemer”.
A particular review observed that the ideas in this Scheme book
could be expressed comparatively clearly and simply in Haskell,
demoing the ideas in code:
http://www.amazon.com/review/R2XSHA3S08XPZN/ref=cm_cr_rdp_perm
The review goes on to describe Haskell thusly:
If you're unfamiliar with Haskell, it's a type-inferencing,
auto-currying
LISP with unparenthesised syntax where “f x” stands for functional
application, “[]” stands for empty list, “x:xs” for cons cell (x .
xs), and
parentheses are used for grouping of expressions. It is non-strict,
so lazy lists are used throughout, and everything is a delayed
lambda, calculated on “as-needed” basis. Having finally produced a
stream of solutions, we rely on Haskell to only calculate as much of
it as is actually requested by a user (usually one by one, as in
Prolog),
thus in effect performing depth-first search of a problem space.
So that piqued my interest, and I was pushed over the threshold
when I landed on this article:
Write Yourself a Scheme in 48 hours:
http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html
…which is a Haskell tutorial which implements a Scheme
interpreter.
Since for me this is practically the ideal way to learn a language
(I had previously been contemplating writing Lisp in Ruby in order
to learn Lisp) I figured this is great, I ought to be able to learn
quite a bit about Haskell and Scheme at the same time.
P.S. I would recommend learning C at some point, though, in any
case. You’ll have a head start there, in so much as a portion of
ruby’s standard library does mirror the C stdlib (printf, gets, etc.)
It’s hard for me to imagine getting by without knowing C.
Regards,
Bill