From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-01-05T02:52:45+09:00 Subject: [ruby-talk:30227] Re: should I use ruby instead of perl In article <3C358F70.2040807@removejippii.fi>, vekkuli ketkutin wrote: > > >Peter Hickman wrote: > >> vekkuli ketkutin wrote: >> >> >>>simple question... >>> >> >> Too vague. >> >> If you were to say "I'm doing research into prime numbers" (like I am) >> then I would say the Ruby has better integer support than Perl and you >> should therefore use Ruby. >> >> If you were to say "I'm developing a site in mod_perl" then I would say >> that you should stick with Perl for the moment as the Apache support >> available in Perl is far superior the Ruby. >> >> If you were to say "I'm developing a missile guidance system" then I >> would say use ADA. >> >> All languages have their strong points, you need to mix and match the >> languages to the problems. >> >> Simple questions only lead to further questions (as it should be). >> >> >> > >I saw this answer coming./ But being familiar with web, I always >look for things in very zen way, not defining too strictly what I want >to hear in beforehand. > >That would not drop some answers I might like to be interested in. > > > >Seriously: > >I need one solution for quick scripting, testing tool development, >and making programs for my hobbies. I love Perl (no, not her -the language!) > >but oop with it is really pain. >Ruby seems to have it in the way I want it, but I'm not familiar enough >with ruby yet to make my decision. As someone who formerly liked Perl a lot but decided that OO in Perl was just too ugly - I would suggest that Ruby is an excellent choice (or maybe to put it the other way, you are an excellent candidate for Ruby :). I programmed primarily in Perl for about 6 years and even did a fair bit of OO perl before I decided that it was just too painful on the eyes ;-) I found out about Ruby about a year ago and withing a couple of weeks I felt more comfortable in Ruby than in Perl. I think you'll find that coming from Perl you can be productive in Ruby after only a short time. > >Perl is swiss army knife but I'm looking more finnish army knife. >Best I could get would be new perl version with full oo support >not doing: > >each(@ar){print;} I think you mean : foreach(@ar){print;} > >but > >ar.each.print() How about: ar.each { |element| print element } >I should evaluate both but I 'm so lazy, you know You should download Ruby and give it a try. I suspect that you'll end up really liking it. [But were you expecting to find a different answer here? :) ] Phil