On 1/3/12 12:06 AM, "Richard" <legalize at xmission.com> wrote:
In article <CB27CA79.A8D1%iank at vulcan.com>,
Ian King <IanK at vulcan.com> writes:
Of course, there are people who think if it
doesn't look like C/C++, it
ain't programmin'. :-) (Of course, not talking about you, Josh - just
say lambda!)
C++11 has lambda expressions.
ISTR another 'stupid programming language tricks' page that opined there
are almost always several ways to solve any given problem - and you'll
find ALL of them in C++!
I toyed with Lisp a number of years ago but, at the time, couldn't think
of anything I wanted to do with it. Recently (the past year or two) I
decided it was time to tackle it again. This time it made sense, I think
in part because I was exposed to functional programming, which broke the
hold of C/C++ on my thinking. (Don't underestimate how solidly one can
become 'stuck' in a particular paradigm.) I find myself drawn to the
Scheme dialect: IMHO (pull the pin and throw) 'Common Lisp' is bloated and
bogged down with syntactic sugar-treats for those who fear recursion.
Not only do I like Scheme/Lisp, but I don?t think it's that hard to teach
it to beginners. For instance, recursion: to do something to a group of
things, take one thing and apply the action, then do the same thing to the
rest of the group until you run out of things. Easy! If you need to
accumulate a solution from the multiple operations, just combine the
return value of the first action with the return value of the action on
the remainder. Turtles all the way down?. Looping constructs are
syntactic wrapping for this idea.
Further, I agree that they would begin their journey into computational
thinking with a solid foundation on which to build an understanding of
whatever other languages they might find that map well between a
particular problem domain and the computing environment (which is one
legitimate reason we have so many programming languages!). And as some
have touched on within this thread, the greater good is to create
computational literacy, not to just teach people how to write programs.
-- Ian