|Syntactic Confectionery Delight|
Re^3: OT: Ruby On Rails - your thoughts?by dragonchild (Archbishop)
|on Nov 17, 2005 at 20:24 UTC||Need Help??|
When DBIx::Class can do what Re^2: OT: Ruby On Rails - your thoughts? describes, then I'll be impressed. Why isn't DBIx::Class required by Catalyst vs. Class::DBI? Why isn't DBIx::Class being trumpeted to the rooftops? Why is CDBI still forced onto poor unsuspecting users?!? The world wants to know!
A huge win that ActiveRecord and Rails have is the fact that they use Ruby. For example, here's some code I wrote in Ruby that directly uses DBI.
This is the equivalent code in Perl.
Which one is easier to read? Which one is easier to modify? Which one is easier to verify in terms of variables staying in scope? And, this is an example that is not only written by someone who's an expert in Perl vs. a novice in Ruby, but it's an example that's catering to Perl's strengths! And, Ruby still is a win in my eyes. Just imagine this kind of code within a much larger application. By using the first-class blocks that Ruby provides, that's a huge amount of scoping ... for free!
The only true win Perl has in those snippets is the array slicing at the bottom. I'm pretty sure that's because I suck at Ruby and not because Ruby sucks vis-a-vis Perl.
Rails may suck relative to Catalyst, but it couldn't be written in Perl (or Java or any other language). I hate to say it, sri, but Catalyst could be written in Ruby.
For the record, Catalyst is my preference for new webapp development in Perl and I think it's an excellent step forward. Rails is my first choice for new webapp development in any language.
My criteria for good software: