Hacker News new | ask | show | jobs
by brianchu 4164 days ago
FWIW, UC Berkeley's intro CS course sequence goes through the following languages in order: [Scratch (in an optional gentle-intro CS course)], Python (with an emphasis on using it for functional programming), a tiny bit of Scheme, a tiny bit of SQL (before they used a toy logic programming language), Java, C, MIPS assembly. I think this walks down the ladder of abstraction very nicely.
3 comments

Odd to use Python as your intro to functional programming, since it lacks many functional programming features besides lambdas which the language creator doesn't even like (http://www.artima.com/weblogs/viewpost.jsp?thread=98196)
Python is more object-oriented than anything else. It's not terribly functional. Most tasks that can be accomplished with functional programming in Python aren't.
Lambdas (in Python) are just syntax; it's usually better to achieve concise Python code using list comprehensions. The critical feature for functional programming is first-class (and higher-order) functions, which are supported and encouraged in Python. I think Python is better for an introductory functional programming course than C#, Java, C++ et al, which also support "functional programming features" but only in the context of a fairly rigid OO system. What do you think is missing from Python?
I'm actually somewhat sad that they added the two in front of Scheme. I took an intro to CS course there the summer before heading to college and it was taught in Scheme. The teacher literally taught us the language the first day and then, from there on out, it was learning different techniques through mostly computer labs. Prior to that, my only programming experience had been in TI-Basic, so it was an eye-opening experience to realize that programming was more than just an ordered set of instructions. If I hadn't had that experience, I think I might have learned the wrong lesson when my college CS courses dumped C on me.

I'm not sure about Haskell as a beginner's language, but I consider Scheme to be almost ideal for that purpose since it's so easily digestible.

I particularly like that they walk the ladder of abstraction downwards, not upwards. I'm not totally convinced, but I have a strong hunch that walking down that ladder is more pedagogical than walking up. At least in math I have a much easier time reading the proof if I know what it's trying to prove beforehand.