[Edu-sig] Teaching Python instead of Java?

Alan Gauld agauld@crosswinds.net
Tue, 13 Mar 2001 18:21:51 +0000


>...  Another problem with both C++ and Java is that math
>cannot generally be performed on objects, 

True in Java. But C++ at least allows classes to be built 
to fully mimic(well very nearly :-) primitive types. 
Thus provided operator overloading has been done you 
can perform math and any other native operation on an 
object. Java with its simplified model prevents this 
except by using a mixture of methods and operators.
And of course you'll need to implement a value class 
heirarchy of your own coz Jave doesn't have one...

With C++ you get a much stronger OO model but at the 
expense of simplicity. In Java you get memory management 
but at the expense of a broken object model and only 
slightly reduced complexity. In Python you get everything,
including simplicity at the expense of a little speed 
compared to C++! For teaching Python wins every time.

Alan G.