python as a first language?

William Tanksley wtanksle at dolphin.openprojects.net
Wed Sep 29 19:40:36 EDT 1999


On Wed, 29 Sep 99 21:02:22 GMT, Phil Hunt wrote:
>           NOSPAMcraig at osa.att.ne.jp "Craig Hagerman" writes:

>> Hi,
>> I want to get some feedback on how good Python is to learn for a beginner.

>Python is better for a beginner (& for anyone else, for that matter).

...unless, of course, you can do it in one line in Perl.  A one-line
solution is a wonderful thing.

Other than that, Python wins.

>> or how about Python
>> compared to Eiffel or Sather for this purpose?

>Not used either of these, so no comment.

Eiffel gives up a lot of dynamicity :) in order to provide compile-time
checking.  Experience proves that that's a good tradeoff, in either
direction.  In other words, if you already know Eiffel, learn Python as
well and use both as the mood and need strike.

Sather -- I don't know Sather, but I've looked at it, and I'm very
impressed.  Meyer never DID bother justifying contravariance vs.
covariance, in spite of claiming that he had in OOSC (I was reading it,
and was suprised that in spite of a claim that he'd discussed it, the
index contained references only to a brief mention of both).

I wouldn't mind hearing that Guido was considering Sather's import/inherit
model in Python 2.0.

For those not familiar with Sather, the interesting part of its class
model is that inheriting from a class doesn't inherit any of the class's
data or functions, it only inherits the interface.  In order to use the
functions you have to 'import' them within the body of the class.

If, on the other hand, you only import a class, you can use all of the
other class' methods and data, but it doesn't form part of your interface.

Thusly:

class MyWidget(Widget):
  import Widget

The interesting thing about this is that amongst other things it makes
classes and modules almost interchangable.

However, it also implies a little stronger error checking -- there's no
reason to inherit from a Widget if imports don't cause encapsulation.

>Phil Hunt - - - - - - - - -  philh at vision25.demon.co.uk

-- 
-William "Billy" Tanksley




More information about the Python-list mailing list