[ale] Py[h]hon syntax (sic)

Benjamin Scherrey scherrey at proteus-tech.com
Fri Jan 28 14:55:10 EST 2005


    Whoa there horsey! Let's back up a bit. We're mixing adjectives. 
Pure OO means *everything* is an object and going outside of OO concepts 
is difficult or forbidden by the language ala Smalltalk. Fully OO means 
that the language implements and enforces all the constructs necessary 
to be considered OO, i.e. encapsulation, inheritance, and polymorphism. 
Both C++ and python are fully OO but neither is pure because they also 
support other programming paradigms (like functional programming). But 
there is nothing about python that isn't fully OO and it supports that 
paradigm completely. Your observation about strings not having a size 
method is pure syntactical sugar. Strings are simply a form of list 
which has keyword support already for lengths therefore no need to make 
it a method. It is a very simple matter of deriving your own string type 
and providing a length() method if you wanted to be pure but the 
built-in mechanism is optimized for performance. Strings do have other 
methods unique to them that don't apply to other sequences. FWIW - 
historically *pure* anything languages tend to be regulated to academia 
and perform terribly in the real world. This is why no language invented 
by Nicholas Wirth has ever been a commercial success without first 
violating many of the pure precepts (ala Turbo Pascal).

    -- Ben Scherrey

David Corbin wrote:

>On Friday 28 January 2005 12:16 pm, Christopher Fowler wrote:
>  
>
>>On Fri, 2005-01-28 at 11:57, Joe Knapka wrote:
>>    
>>
>>>But OO is definitely overkill in this example.
>>>      
>>>
>>The problem I have with Perl is that OOP is an afterthought when the
>>language was developed.  I'm looking at Pyhon to do pure OO
>>programming.  
>>    
>>
>
>But Python isn't pure OO.   I admit to limited experience with it, but the 
>experience I've had screams "not yet OO".  Strings didn't even have a 
>length/size method.  An extenral function had to be called.
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>  
>



More information about the Ale mailing list