Why I chose Python over Ruby

Alex Martelli aleaxit at yahoo.com
Sun Mar 5 14:02:47 EST 2006


Francois <florasol at hotmail.com> wrote:
   ...
> I guess my choice of words "rigor and consistency" was not very good.
> In this context "rigor" meant enforcing rules (for example having to
> use parentheses to call a method) to prevent ambiguity rather than
> depending on heuristics. Also "consistency" meant doing things as
> uniformly as possible (for example always call a method with the same
> syntax, whether the variable referencing it is the original name or an
> alias).

Ah yes, these are definitely valid nuances for the terms you've used, I
admit that.  Python's yearning for "only one obvious way" to do
something, even though it's a goal to aim for rather than a reality in
every case, surely does play towards these preferences, while Ruby (not
quite as much as Perl, but still) has a more exhuberant approach, where
having multiple obvious ways to do the same thing is seen as a plus, not
a minus (a classic tiny example is the ability to get the number of
items of an array a by EITHER a.size or a.length, just like for a C++
std::string, with no difference whatsoever among the two synonyms).

So, I'm NOT saying your word choice was not very good: you used words
who do mean what you intend (among other meanings, but then, that's the
curse AND blessing of natural language;-).  But anyway, thanks for the
clarification!  Maybe "uniformity" (though it, too, may suggest
different and not accurate things) could be usefully added to help
communicate your intended meaning (or maybe, for most people, if they
hear all of "rigor, consistency, uniformity", would think of some Nazi
language woefully constraining their expression...?-)


Alex



More information about the Python-list mailing list