Musings about Python syntax

William Tanksley wtanksle at hawking.armored.net
Sat Oct 23 10:27:26 EDT 1999


On Wed, 20 Oct 1999 00:05:08 GMT, Jason Stokes wrote:
>On Tue, 19 Oct 1999 12:27:59 -0700, Jim Althoff <jima at aspectdv.com> wrote:
>>At 07:03 PM 10/19/99 +0200, Fredrik Lundh wrote:
>>>steve_allison at my-deja.com wrote:

>>>hey, what makes you think len(obj) is less object-
>>>oriented than obj.len() ?  it's just syntax, you know.

>>But it IS less consistent syntax with not much advantage
>>("del" is a different story).  So it would be very nice if
>>I could write aList.len() if I prefer that to len(aList).

>Experienced pythoners might correct me, but I believe Python's object model
>is younger than its basic design.

Not true.  Python was designed to be OO from the start.

>Plus, Python has to balance the
>consideration that many people do not wish to program in the object-oriented
>manner.

This is true, but has little to do with this.  The probelm was that in the
original implementation they didn't bother implementing messages in
several of the basic types.

>Personally I prefer a completely consistent committment to object
>orientation, like, say, Smalltalk, but horses for courses and all that.

Not really relevant.  You could complain about the inconsistent syntax,
but in fact that serves a purpose as well.

>Jason Stokes: jstok at bluedog.apana.org.au

-- 
-William "Billy" Tanksley




More information about the Python-list mailing list