[Tutor] object orientation

Christian Meesters cmeesters at ucdavis.edu
Mon Nov 15 06:40:03 CET 2004


These days I was reading a discussion between "Ruby-people" and 
"Python-people" (us) on pros and cons of each language. Such 
discussions aren't very meaningful, of course, but sometimes 
interesting. One of the arguments was about the realization of the 
OO-approach in the languages. And this leads me to my question: Though 
I like the Python syntax and actually prefer it above Ruby's, I wanted 
to know why we write len(x) instead of x.len() (x being a string for 
instance). Does anybody know an essay / link about why this approach 
was chosen? It makes sense within Python, of course, but for now I'm 
merely interested in the history. My own screenings of the web didn't 
bring up anything useful about this topic.

Thanks in advance,

More information about the Tutor mailing list