[Edu-sig] Teaching Python instead of Java?

Thomas O'Connor toconnor@vcd.hp.com
Sun, 11 Mar 2001 22:04:39 -0800


On Sun, 11 Mar 2001 12:49:30 +0100  David Pettersson wrote:

> What I am wondering is if Python is a better alternative, and why if is so.

While I have little experience teaching Java to beginning programmers, I
am currently assisting a local high school teacher who is using the
text: "C++ for You++," to teach an AP programming class.

The books makes pretty extensive use of templates and the Advance
Placement class libraries very early on.  Unfortunately it doesn't even
introduce the concept of a class until chapter 15 (out of 21) in the
book.  

What I observe is a significant amount of confusion from the students. 
They may go through the motions, utilizing code fragments that they
copy out of the book, but even the best students don't have the
slightest idea what is going on.

Java suffers similar problems:  Since everything is a class, the concept
of a class must either be introduced immediately, or the students must
accept on faith that this is something they will eventually learn about
and for the present just code classes.  The problem is that classes are
abstract data types, which are abstract concepts for people new to
programming.  Another problem with both C++ and Java is that math
cannot generally be performed on objects, necessitating frequent
conversion between native data types and class instances.

Based on my observations of beginning students, I believe that python
can provide an interactive, manipulative environment where those
students can learn in small chunks without having to have either prior
knowledge or faith.  At the same time, the language is rich enough to
use for introducing advanced concepts such as abstract data types and
inheritance. 

But then, I'm speaking as an observer, not a teacher.

Tom O.