Why I chose Python over Ruby

Xavier Morel xavier.morel at masklinn.net
Sun Mar 5 14:19:58 EST 2006

I'll just play the devil's advocate here

Francois wrote:
> 1) In Ruby there is a risk of "Variable/Method Ambiguity" when calling
> a method with no parameters without using () :
Yes, but that's in my opinion a programmer error, not necessarily a 
language error.

> 2) Ruby does not have true first-class functions living in the same
> namespace as other variables while Python does :
> In Ruby you need extra syntax that ruins the "first-class-ness" :
The extra syntax is a side-effect of the parensless call of method, it 
doesn't mean that methods are not first-class objects.

And Ruby solved this issue with blocks/procs (that and closures are the 
only reasons I found for blocks to exist in ruby). In python you pass 
functions around, Ruby's equivalent of unbound functions are 
blocks/procs, what your code created here is a ruby method, equivalent 
to a bound method in Python, the semantics are really different (and in 
Python using this bound method would also require extra work).

More information about the Python-list mailing list