From: Jim Weirich Date: 2003-08-22T10:52:19+09:00 Subject: Re: What attracts me to Ruby On Thu, 2003-08-21 at 13:34, Tim Rowe wrote: > On Thu, 21 Aug 2003 07:15:28 +0900, Gavin Sinclair > wrote: > > >Many Pyhonistas (and perhaps others?) say Ruby is too Perlish for > >their taste. What they generally mean, I think, is that Ruby has $x > >variables, and some syntax similarities (if, while, ... modifiers). > >The judgement is true but: > > - superficial, because Ruby is deeply elegant, which shouldn't be > > ignored among surface comparisons > > Maybe, but when one is struggling to get to grips with a language it's > the syntax that's most evident, and until one gets past that one can't > see the more profound issues. > > > - irrelevant, because the "too-Perlish" fears (unreadable code, > > different ways of doing things) don't materialise in practice; Ruby > > code tends to be elegant, readable, etc. because coders don't abuse > > the language > > Wan't somebody here deprecating Python for it's "one way of doing > things" a while ago? When I saw my first Python program I understood > perfectly well what it did, but when I saw my first Ruby program I > couldn't make sense of it. Obviously, that's a function of my > personal history (and in particular, I still believe, that my personal > history doesn't include Perl), and readability is bound to improve > when one learns the language! > > >On the contrary, I have always considered Python to be too Perlish for > >me at a deeper level, because although it tries hard to do OO better > >than Perl, it's still wasn't part of the original language design. > >Its OO capabilities are a "feature" in the language, rather than the > >wellspring of the language. > > That's another reason I like Python (and prefer C++ to Java, FWIW) -- > I don't believe object orientation is the answer to all problems, and > sometimes it just gets in the way. Python (and C++) give me the > choice, Ruby (and Java) don't. Now I'm getting /really/ confused > which language has "more than one way to do it" and which has "only > one way to do it" :-) > > >What attracted me to Ruby, then, was its elegance, which made me > >believe I could use it for more than 10% of my programming, which > >makes it more worth learning. > > It's curious. By all logic, I don't think Python should work. But my > productivity is higher -- vastly higher -- with Python than it has > been with anything else. By the same logic, Ruby ought to be great, > but I find myself permanently stuck at first base struggling to get > the simplest stuff to work. This is really interesting because my experience is exactly the opposite. I tried to learn Python three times, but never got past the really trivial stuff to get productive. It was during my third attempt that I saw Dave Thomas post about Ruby. I downloaded Ruby and was using it productively within a day or so. Now my background did include Perl (as well as Java, C++, Eiffel and a little Smalltalk), and I was delibrately looking for a Perl replacment, something with better OO facilities. I suspect it was a combination of the Perl and Smalltalk background that prepared me for Ruby. What in Ruby do you find yourself struggling with? -- -- Jim Weirich jweirich@one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)