Python misconceptions in IBM Ruby article...

John Farrell jfarrell at mincom.com
Thu Feb 17 20:16:07 EST 2000


Stuart Hungerford wrote:
> Neither Python nor Perl were designed as
> object-oriented
> languages. Consequently, the OO features often feel "added on" and are
> not fully
> integrated into the language core, making for cryptic code."""

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.
 * 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.
 * 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.
 * Proper OO languages do not use white space to delimit blocks,
   and use semicolons and block delimiters.

That last one's a joke! Don't turn this into another white space thread!
Anyway, even though I do agree with the added on statement, that does not
mean that Python is bad or needs to be changed. I am only pointing out
that the criticism is justifiable.

John
-- 
Dr John Farrell - Research Architect - Mincom Limited

I don't suffer from stress.  I am a carrier.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s++:+ a C+++ U+ P-- L E--- W++ N+(-) o+ !K w---(+) !O !M !V PS+ PE Y?
PGP t--- !5 !X R(+) tv- b++ DI++ D G e++++ h---- r+++ y++++(*)
------END GEEK CODE BLOCK------
This transmission is for the intended addressee only and is confidential
information. If you have received this transmission in error, please delete
it and notify the sender. The contents of this E-mail are the opinion of the
writer only and are not endorsed by Mincom Limited unless expressly stated
otherwise.




More information about the Python-list mailing list