Subject: Python as an introductory programming language (fwd)

From: Shlomi Fish <[email-masked]>
Date: Fri, 7 Dec 2001 10:09:05 +0200 (IST)

I am forwarding here a message by Damian Conway in which he expresses his
opinion regarding Python as an introdcutory programming language in
regards to the discussion we had a few monthes ago.

Regards,

	Shlomi Fish

---------- Forwarded message ----------
Date: Fri, 7 Dec 2001 14:38:53 +1100 (EST)
From: Damian Conway <[email-masked]>
Reply-To: [email-masked]
To: Shlomi Fish <[email-masked]>
Subject: Re:  Python as an introductory programming language + Seven Deadly
       Sins Inquiry

Hi Shlomi,

You wrote:

   > we discussed if any of the existing commonly used languages is
   > suitable as an introductory programming language. Some people have argued
   > that excluding the fact that it uses indendtation for scoping, Python
   > would be ideal for it. I tended to disagree with them, but I could not
   > tell them exactly why. What is your opinion on the subject?

My opinion is that no OO language is ideal as a first programming language.
Introductory languages need to be simple, to avoid introducing too many
semantic layers that all have to be understood at once in order to program.
Most OO languages compound this problem by requiring the programmer to
use an extensive library to do most tasks (thereby adding yet another layer).

In fact, I would go so far as to argue that *no* real-world language is
well suited as a first programming language, for the same basic reasons:
too big, too powerful, too complex, too many semantic layers.

---

From: Adi Stav <[email-masked]>
Date: Fri, 7 Dec 2001 20:03:56 +0200

> regards to the discussion we had a few monthes ago.
.
.
> From: Damian Conway <[email-masked]>
.
.
> too big, too powerful, too complex, too many semantic layers.

I think this is an important point, but I don't entirely agree 
(except for with the standard library argument). A language need 
not be entirely simple (or, rather, simplistic) to be easy to learn 
-- what is important is to be able to write simple programs using 
the basic characteristics of the language. 

As a negative example, It is possible to create simple subsets of 
almost any language that will be more or less suitable as first 
languages, but I think that for the majority of the langauegs such 
subsets will feel rather unnatural to a programmer experienced with 
that language (e.g., C). The problem with that is that it will be 
difficult to continue teaching more advanced topics without changing 
to a different language, whether the change is explicit (let's dump 
Basic and teach Pascal) or implicit (now that they know C, let's 
teach pointers). 

Rather, I think that some languages allow a much more gradual 
transition -- the advanced features of such languages seem like 
extensions of the basic ones. In the Python OOP case, for instance, 
an object is just another way to group variables, and the student 
will have to know how to group variables by that time anyhow. OOP 
in Python is not some advanced magic, as it is in Perl and to a 
lesser extent C++, neither it is a particularly sophisticated method 
of working with the language's featuers like it is with most C OOP 
implementations.

To sum it up, I don't think an entire language need to be learned in
one go, nor do think OOP must be learned in one go. I think it is 
very natural to progress from "these functions and their data are 
related so let's keep them together", and the full weight of 
multiple-inheritence and polymorphism theory.

---

From: Shlomi Fish <[email-masked]>
Date: Fri, 7 Dec 2001 18:12:06 +0200 (IST)

> the basic characteristics of the language.

Check:

http://use.perl.org/article.pl?sid=00/10/25/2258208&mode=thread (search
for "having taught").

As you can see there, Dr. Conway himself does not favour the approach of
teaching a subset of a language. And I think he has a point. I'll quote
him here, just in case:

<<<
Having taught introductory programming to several thousand freshman, in
several languages, for the past 10 years, I can assure you that teaching a
subset of a language is not a successful strategy. I have tried that
approach on three separate occasions, and it just doesn't work.

As I explained in the "Seven Deady Sins" paper, it fails for two reasons:

   1. None of the textbooks or reference works available restricts itself
to the subset you've chosen to teach, so when the students are looking for
help, they're constantly fighting their way past concepts and syntax
they've never seen before.

   2. The compiler/interpreter you're using doesn't restrict itself to
your subset either. So every mistake they make triggers features or errors
that you've (deliberately!) not equipped them to understand.

> Basic and teach Pascal) or implicit (now that they know C, let's

It could be a good strategy to teach the introductory programming course
in one language which is highly suitable for this task. Then, for more
advanced topics you can use a different one.

> of working with the language's featuers like it is with most C OOP

I don't understand why OOP in Perl is "advanced magic". There is some
accomodation for it in the interpreter and in the syntax, but so there is
in Python.

> multiple-inheritence and polymorphism theory.

We are not talking here about teaching OOP. We are discussing how to teach
introductory programming.

Regards,

	Shlomi fish

>
> To unsubscribe from this group, send an email to:
> [email-masked]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

----------------------------------------------------------------------
Shlomi Fish        [email-masked]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [email-masked]

If:
1. A is A
2. A is not not-A
does it imply that
1. B is B
2. B is not not-B