Python misconceptions in IBM Ruby article...

Grant Edwards nobody at nowhere.nohow
Fri Feb 18 00:18:08 EST 2000


John Farrell <jfarrell at mincom.com> wrote:

>I agree that Python's OO features feel added on. Consider:
>
> * You have to pass self to each member function. There's no obvious
>   requirement that self need actually be the bound instance.

> * In a method, fields of the bound instance need to be referenced
>   through the self parameter, because the scoping rules do not understand
>   about instance variables.

The use of the 'self' parameter in methods is something that
both Modula-3 and Smalltalk do (IIRC -- it's been a few years).
I think it results in much more readable code.  While OO may be
an 'add-on' in the case of M3, I hardly think that you can
claim OO is an 'add-on' to Smalltalk.

> * Classes are not types. This strongly suggests that Python had
>   types other than 'instance' first, and when objects were added,
>   it was too late to make all types classes.

The class/type dichotomy is a sticky one.

> * Proper OO languages do not use white space to delimit blocks,
>   and use semicolons and block delimiters.

Proper languages put semicolons _between_ statements not at the
end of statements.

-- 
Grant Edwards                   grante             Yow!  Let me do my TRIBUTE
                                  at               to FISHNET STOCKINGS...
                               visi.com            



More information about the Python-list mailing list