[Haskell-cafe] Python?
Michael Vanier
mvanier at cs.caltech.edu
Tue May 10 22:06:06 EDT 2005
> Date: Tue, 10 May 2005 19:02:33 -0400
> From: Daniel Carrera <dcarrera at digitaldistribution.com>
>
> Hello,
>
> This might be a strange question to ask on a Haskell list, but I do want
> to hear your opinions. What do you think of Python?
>
> To explain where this question is comming from:
>
> I have a lady friend who wants to learn how to program. I just decided
> to teach her Python for practical reasons:
>
> 1) Python has a nice IDE-ish thing. It's called "idle". It includes both
> a shell and an editor. The interface is simple and clear.
>
> 2) I can't get Helium to compile (since I can't get ghc to run) on Solaris.
>
> 3) Python has some nice introductory documentation. The Haskell
> documentation is more advanced.
>
> 4) She's interested in writing an OOo plugin some day. Python can do that.
>
> But I do hesitate. I would like to teach her Haskell because I think
> it's a better language. But I just don't seem to have the tools to teach
> it to a complete beginner (idle, documentation).
>
Trying to teach Haskell to non-programmers is, IMNSHO as someone who
teaches programming to very smart kids as my job, a *very* bad idea. It's
simply too rich and difficult a language for beginning programmers. The
conceptual barriers are formidable even for most experienced programmers,
and there are much easier ways to accomplish the goal of learning
functional programming (including Haskell), if that's what you want. The
sequence I recommend for that is Scheme -> Ocaml -> Haskell, which involves
picking up a few new concepts at each stage. You could also go Scheme ->
Haskell for very bright and ambitious students. However, Scheme is not
currently a very practical language compared to (say) python, and python
does contain some functional aspects as well. So python is a decent first
language both for practical programming and for would-be functional
programmers. I've noticed that most of the hard-core FP types I know also
use python occasionally as their imperative language of choice -- it's
simply less distasteful than most of the alternatives.
Here at Caltech we teach Scheme first (for programming concepts), then
students can go in several different directions. Learning java or C is a
common next step. Python generally comes after java and C, though it
doesn't have to, and most students have no trouble picking it up. Ocaml
and Haskell come later, and only a few really hard-core types learn those.
Eventually I hope that functional languages will become more mainstream and
"practical", because they're just better. But for someone who wants to get
a practical language under her belt, starting with Haskell is not the way
to go. I have enough problems convincing people to learn Scheme. I've
even had people beg me to teach them Matlab as a first programming
language, because that is the only language that they needed to get their
work done. Telling them that Matlab's programming language is a creeping
horror doesn't sway them at all.
Mike
More information about the Haskell-Cafe
mailing list