Monday, December 20, 2004

Otaku, Cedric's weblog: Tim Bray at JavaPolis

Cedric echoes my opinion on Python...

Otaku, Cedric's weblog: Tim Bray at JavaPolis:
The presentation is overall interesting but not very innovative. Tim compares the number of lines and characters used to solve a simple problem and draws a number of conclusions. The one I disagree the most with is his assertion that Python is more object-oriented than Java. "Almost irritatingly so", he says, arguing that sometimes, Python is "too" object-oriented for his taste.

I am still scratching my head at this, and it's hard for me to understand how you can tell that Python is very object oriented when:

* You need to pass "self" as a parameter to all your methods... Does this remind you anything? Right, that's how we "simulated" object-orientation in C, by passing the address of the current object in first parameter. If anything, this shows that Python is not object-oriented, and this flaw is a simple illustration of Python's old age (it was not object-oriented when it was created, more than fifteen years ago).

* You can't pass messages to, say, strings, as you can in Java, Ruby or Groovy ("foo".size()). Writing code in Python usually ends up being a mix of imperative and object-oriented calls that doesn't always follow any logic.

Python is a fine language but overall, I am quite surprised by the amount of misconceptions that people have about it, and Tim is certainly not the first one falling under Python's spell. I chatted with Tim after his talk and he admitted not being a very proficient Python programmer... Mmmh.

No comments: