Python vs. Ruby
Mike C. Fletcher
mcfletch at rogers.com
Tue Dec 31 19:55:00 EST 2002
Why post sarcasm to the Python list? To convince a Python user (or
heck, any user who's used to polite society ;) ) of the superiority of
Ruby you might try something along the lines of:
"""Ruby was created a long time after Python and PERL. It tries to be a
better language based in part on observing these older languages and
does these things differently as a result:
* implementing "purer" object orientation (methods on numbers and
the like)
o explain that some find this to be a "foolish consistency",
while others find it useful
o discuss the philosophical approach of both languages
o present thoughtful and well-reasoned explanations for your
point-of-view.
* using delimiters instead of indentation-based block structure
o give pros and cons, note the debates, explain why this is a
compelling argument against Python when most Python users
consider it a great strength of the language.
o If you don't feel like doing this, just point to the long
(and wearisome, and pointless) debates elsewhere.
* breaking object-orientation to return new objects when sorting
sequences ;)
o explain the Python wart (I too consider it a wart, but it's
an object-orientation-consistency-generated wart)
o explain why Ruby has a better approach, and how it fits into
the Ruby philosophy of purer OO
o might also want to explain that it's not a hard thing to fix
at some point in Python (if the powers-that-be want to) by
adding "sorted" and "reversed" methods to the list object
(no clue why you want "append" to create a new list, sounds
silly to me ;) ).
* put the rest of your reasoning here...
"""
Appologies if the sarcasm was intended to demonstrate the futility and
silliness of "my language is better than yours" threads (the sarcasm is
discussing what many consider to be one of the greatest features of
Python, the lack of extraneous syntax, so that's certainly possible).
There weren't any other strong indicators of ;) -y-ness (save that the
"sort" and "reverse" are "the ugliest warts" of Python (strong praise
indeed)), so I took it at face value.
Peace all,
Mike
John Roth wrote:
>"Fred" <fred_news at lrc.puissante.com> wrote in message
>news:_YhQ9.391356$GR5.119074 at rwcrnsc51.ops.asp.att.net...
>
>
...
>[sarcasm]
>Ruby, of course, has brackets for code blocks which seems
>to be a nicety that Python missed.
>[/sarcasm]
>
>It also has a solution to one of the ugliest warts in Python:
>the fact that the .append(), .sort() and .reverse() methods
>don't return an updated value, so you can't chain them.
>
>The rest of the differences other people have pointed out
>(other than the size of the library) are, to me, relatively
>minor.
>
>John Roth
>
>
...
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
More information about the Python-list
mailing list