Typed Python?

Jacek Generowicz jacek.generowicz at cern.ch
Wed Jul 7 16:45:37 CEST 2004

Ville Vainio <ville at spammers.com> writes:

> >>>>> "Jacek" == Jacek Generowicz <jacek.generowicz at cern.ch> writes:
>     Jacek> Regarded as such by whom ?
>     Jacek> Probably by students who saw lots more job adverts for
>     Jacek> Java, C++, VB, COBOL etc. programmers.
> Mostly by students, media and "the guys at the internet" ;-). Students
> often have some idea of what local companies use at least,
> though. ISTR the lecturer didn't disagree either.

The problem with many Lisp/Scheme lecturers is that they completely
miss the point about Lisp and Scheme.

I actually attended a Lisp course at university (we used Common Lisp),
but it wasn't until about 10 years later that I first noticed that
Common Lisp wasn't a quaint language for manipulating lists
recursively, but that it is the most advanced development environment
for solving complex problems in existence, that it has the most
sophisticated Object system around [... waxing lyrical for 12
screenfulls suppressed ...]

Forgive me if I don't give too much weight to the opinions of your
average Lisp/Scheme lecturers.

>     Jacek> delivering applications in these languages, and I would bet
>     Jacek> that they are doing it far more efficiently than all those
>     Jacek> who do so in Java, C++ or COBOL ... and are having much
>     Jacek> more fun in the process, and are probably getting paid much
>     Jacek> more.
> The languages you enumerate are irrelevant for this
> discussion. Contrast them with Python.

Fine ... all this week, in which I've been programming almost
exclusively in Python, I've been cursing it, and wishing I were
programming in Common Lisp, because in Common Lisp I would be much
more productive, and be having much more fun. In particular, this
week, I miss CL's condition system (stack does not get unwound when a
condition is signalled, so I don't lose any data I can inspect all the
frames in the stack right up to the one where the signal came from,
debug, redefine some buggy functions and continue execution from the
very point where it broke off ... which brings me to the second thing
I'm cursing abouth this week ...) and it's ability to update single
functions in a running program robustly (works fine in Python right up
to the point where you start using modules ... which is not very far).

Which is kinda ironic, given that last week I was giving my Python
course, and one of the first things I tell the students there is that
Python is sooo bloody wonderful for incermental development.

OK, so CL was not in my original List, but I think it ranks among
those that "everybody knows that nobody uses for any real work".

(Unfortunately, I wouldn't be getting paid more if I were programming
in CL; I'd proably get fired :-)

>        Smalltalk (50 projects)
>        Forth (55 projects)
>        Scheme (181 projects)
>        Lisp (307 projects)
>        C# (1602 projects)
>        Python (3392 projects)
>        Java (12617 projects)
>        C (13799 projects)
>        C++ (13943 projects)
> This alone isn't very interesting - what is interesting that some of
> these languages are very old, have had all the time in the world to
> gain a strong foothold, have been pushed by industry giants such as
> IBM, and now have... 50 projects.

Let's do this exercise again when Java reaches the age of Lisp. My
prediction is that Lisp will still be there, while Java, C++ and C#
will not. I rate Smalltalk's chances of still being there at that time
as greater than Java's. (C# is guaranteed to be gone; it will have
been replaced (4 times over) by MS's next langage du jour.)

> Of course people have jobs using any odd language in the world.

It was you who originally expressed surprise at Francois having had a
Scheme job.

> Another thing is whether it pays off for future students to learn a
> language that they won't need after that one course,

What they will need in the future, depends on what they choose to do
in the future. If they want to be Java monkeys, then they should not
bother with Scheme. If they want to be highly skilled programmers,
then Scheme is a vastly superior choice to Java (and even Python).

> unless they choose to stay in school & join academia.  Some might
> say that the time would be better spent by teaching Python instead.

Some might say that the time would be better spent teaching
accountancy. It all depends on what you want out of life.

> After Programming I course (in Scheme), I still felt that I was a
> better C/C++ programmer than Scheme programmer. If the same time was
> spent learning Python, my Python skills would quite probably have
> exceeded my C/C++ skills

That may be. But the chances are that you were a better _programmer_
than you would otherwise have been. (But this depends on the amount of
enthusiasm with which you followed the course. I certainly missed a
number of opportunities in my life to learn very valuable things,
merely by being too naive to appreciate the importance of what was
being taught at the time it was being taught.)

Becoming a good _programmer_ is not about becoming proficient in some

> and I would still have achieved all the "pedagogical" aims of the
> course

I doubt it. But that's just my opinion. And it all depends on the sort
of person/programmer you are.

It's interesting to look at the Amazon reader reviews for SICP. The
only ratings it gets are either 5 stars or 1 star. There is nothing in
between (well, there may be one). If you read the actual reviews, and
see how the opinions correlate with the star rating, you see two clear
types of people emerging: those who will become Java monkeys, and
those who will become skilled programmers. If you fall into the latter
category, then teaching you in Python rather than Scheme would have
been a great service to you; if you fall into the former category then
it would probably have been a great disservice to you.

[*] You call the course "Programming I". That should be a hint to you
    that the purpose of the course was not to make you more proficient
    in Scheme that in C++

More information about the Python-list mailing list