|Don't ask to ask, just ask|
Re: Ruby Before Perl? Nah.by samizdat (Vicar)
|on Jun 04, 2008 at 13:10 UTC||Need Help??|
I'm in the midst of a RoR project. In a lot of ways, "the Ruby Way" is a help, in that I can just follow one of many linear project books to its conclusion and out pops a completed website. Ruby and Ruby on Rails are an amazing set of constructs.
The OP points to optional bits of syntax like curly brackets around hashes, and I agree that takes a lot of getting used to. It does make the code cleaner to look at, and idioms do tend to become very familiar quickly since Rails only uses a common subset of Ruby, relying heavily on symbol-referenced hashes.
I think the online docs (api.rubyonrails.org, for instance) are very good although their search capabilities could be dramatically improved. I do agree that there's no PerlMonks-equivalent that I've found although there are a lot of websites out there that are built on a social network framework. Ruby is very much a new kid on the block still, and it takes time to attract the kind of multitalented person who will nurture a PerlMonks until it takes off.
Now the tough question: Perl or Ruby? I still use Perl one-liners a lot. For scripting and one-pagers, I have not made the transition to Ruby. What I do like about Rails is that it's amazingly powerful and complete for web system-building. I'm sure that Mason and other Perl-based frameworks can do a lot, too, but Rails (even with a learning curve and constantly improving capability set) lets me do a huge amount with a very small amount of code, albeit in four different syntax structures. If it weren't for Rails and something else I'll get to in a moment, I'd be fairly comfortable staying with just Perl although I agree with the comment that Ruby OO and collection classes are far better. Perl is everywhere, more people can read and debug it, and it works well for a lot of different tasks.
The one over-the-top is the books I mentioned before. Since Rails does so much for you, it's possible to build a complete shopping site or social network within the few hundred pages of a book -- including detailed test frameworks on unit, functional, and integrative levels. Wow. Ruby also has lots of learn-the-language books, but this new thrust of build-something-from-the-ground-up books is one arena where Perl (Mason, TT, Embperl) books have not kept pace. Even the O'Reilly books on Mason et al fall far short; they're more cookbooks than guided projects. Perl started this trend in the early days with CGI, but it has not kept pace due to the fragmenting of the landscape.
I think community will come with maturity in Ruby. Certainly there are local user's groups with active memberships. I haven't seen the fanatics yet, myself, but then, I would diffidently suggest that those types are a fixture of the open source community and show up in every project at one stage or another, as anybody who's ever been whacked over the head with a stuffed penguin will agree.
I'm not one who has a right to criticize. Though I've contributed in a small way to The FreeBSD Project over the years, I'm much more a user of open source than a developer. Those of you who've followed my growth here know that I'm a strong believer in getting the job done whatever the toolset. Just as there's room at PerlMonks for Corn Flakes and Beer alongside bananas and grape juice, so, too, is there room in the world for both Ruby and Perl.
"There's more than one level to any answer."