What's better about Ruby than Python?

John J. Lee jjl at pobox.com
Tue Aug 19 13:18:07 EDT 2003


Alex Martelli <aleaxit at yahoo.com> writes:

> John J. Lee wrote:
>    ...
> > I'd never noticed that.  Greg Ewing has pointed out a similar trivial
> > wart: brackets and backslashes to get multiple-line statements are
> > superfluous in Python -- you could just as well have had:
> > 
> > for thing in things:
> >     some_incredibly_long_name_so_that_i_can_reach_the_end_of_this =
> >       line
> > 
> > where the indentation of 'line' indicates line continuation.
> 
> I see somebody else already indicated why this isn't so.

Andrew Dalke?  I just read that, and didn't see any contradiction of
Greg's idea, just a discussion of it.  Or did you just mean 'it isn't
a wart'?

[...]
> > You may be right there.  Guido's comment that tuples are mostly
> > mini-objects did clarify this for me, though.
> 
> Oh, I'm quite "clear" on the issue,

Didn't mean to imply otherwise.

[...]
> > In the end, though, don't you agree that any such judgement is, from
> > the pragmatic point of view, pointless once you realise how similar
> > the two languages are?
> 
> No, I entirely disagree.  I do have to choose one language or the
> other for each given project; I do have to choose which language
> to recommend to somebody wanting to learn a new one; etc, etc.

Yes.  My criterion is then simply: "Which language is more popular?"
rather than "Which is marginally better?".  Well, strictly, it's
"which has better free library code, ng support, etc.", but that's
reasonably well-correlated with popularity (unless you're Japanese, in
this case, perhaps).

[...]
> Non-linguistic considerations such as the above may also have their
> weight, in some case.  But they're not huge ones, either.

I had the impression that the amount of good library code out there
for Ruby was small, which I view as more important than the language
features which have been discussed here (with the possible exception
of this retroactive builtin class modification business, if people do
use it -- still seems incredible, but from Andrew's post it seems
you're right to be repulsed by this).  But maybe the Python <--> Ruby
bridge is good enough that that (library code) isn't such a problem.


> >> about undistinguishable to anybody and interchangeable in any
> > 
> > *in*distinguishable.  Ha!  I found a bug.
> 
> You're wrong, see e.g. http://dict.die.net/undistinguishable/ :
> the spellings with the initial "u" and "i" are just synonyms.

:-( Google reports > factor of 10 fewer hits for it than 'in', and
it's not in my little dictionary.  I wonder if it's in the OED...

[...]
> > I mostly agree, but I think you could be accused of spreading FUD
> > about this.  Does anybody *really* choose to alter string-comparison
> > semantics under everybody else's nose in Ruby??  That would be like
> 
> As I see others indicated in responses to you, this is highlighted
> and recommended in introductory texts.  So why shouldn't many users
> apply such "big guns"?
[...]

That is indeed strange.


John




More information about the Python-list mailing list