4 ms·
Here's my take, after working in Ruby/Rails for a year, and coming from a background in C++ and Perl (with a tiny bit of Lisp in my distant past): Ruby is noth
by timr 19y ago
Here's my take, after working in Ruby/Rails for a year, and coming from a background in C++ and Perl (with a tiny bit of Lisp in my distant past): Ruby is nothing like Lisp. It has some metaprogramming features that make you think (vaguely) of Lisp, but fundamentally, it's more like the bastard child of a torrid, three-way affair between Lisp, Python and Perl -- the genetic heritage was passed on, but poor baby Ruby got little of the careful childhood upbringing.
The result? Ruby has the syntactical consistency and beauty of Perl, and the blazing speed and low overhead of Lisp. There are roughly six dozen different ways of doing everything (including really simple things, like delimiting blocks), and bizarre inconsistencies in basic use cases (e.g. most String functions return copies, whereas nearly everything else works by reference), and plenty of long-term code maintainability nightmares lurking in the corners.
It can be fun to code in Ruby, and it's certainly a language you should check out someday, but I'm still not sure it's the language you want to choose for a project involving a team of programmers or long-term project maintenance. My advice, if you know neither Ruby nor Python, is to learn Python, unless you've got some particular reason (i.e. a job) to learn Ruby first. Rails is an okay framework, but Django is okay too, and Python is the more elegant language.
(Now...if you'll excuse me, I'm going to go put on my asbestos underwear....)
- dats 19y ago"Ruby has. . .the blazing speed and low overhead of Lisp." How did you conclude this?
- run4yourlives 19y agoWith a smirk, most likely.
- dats 19y agoGranted the OP was being facetious in claiming the beauty of Perl or blazing speed of Lisp, but he was sincere in analogizing Ruby to Perl and Lisp. In that sense, he was wrong. Ruby is nowhere near the speed of Lisp. Peter Norvig claims Lisp is "about 1 to 2 times slower than C++" (http://norvig.com/python-lisp.html http://norvig.com/python-lisp.html), and I don't think anyone would sensibly equate the speeds of Ruby and Lisp.
- sunkencity 19y agoWell on a related note, when you become really comfortable with ruby, it's incredibly fast to write scripts and one-liners to do really complex stuff. Especially with the ruby shell as help.
- donw 19y agoI was about to post a comment about you being insane when I read 'syntactical consistency and beauty of Perl', but then I re-read what you wrote and my Sarcasm-O-Meter started beeping. I'm not sure your argument about Python/Django being better for long-term use really holds muster. There are a lot of very passionate Rails hackers, and I can see Rails taking over the web application development sphere over the next few years. This isn't because it's necessarily better, mind you, but because Rails has a hell of a lot of mindshare. So, you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers. Or should you? Rails is the web development framework for Ruby. There are probably others, but nobody has ever heard of them, so they don't matter. Python has Django, and Pylons, and TurboGears, and so on. Your hypothetical future Python web developer, then, has a lower chance of being an expert in The Best Web Framework than does the Ruby hacker, because with Ruby, you only have one choice.
- timr 19y ago"you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers." It's not finding the coders that's hard (any smart coder can pick up Ruby quickly); it's the quality of the code that any new person will inherit. My experience is that the syntactical looseness of Ruby leads to write-only code. Lots of people complain about the readability of Perl, but Ruby is really only nominally better. In Python, readable code is the rule, not the exception.
- jshen 19y ago"any smart coder can pick up Ruby quickly" True, but can they pick up ruby quickly, and rails (rails is non trivial these days), and rspec, and rake, etc. I'm guessing it would take at least 6 months to become merely comfortable with all of these. This is far different than having a proficient coder walk in the door. You'll have much better luck getting a proficient rails coder than a proficient django coder. On the flip side I'm starting to get a lot of rails candidates that aren't really interested in rails, but used it at their previous job. For while if someone had rails on their resume it meant they took the time to learn it on their own (which is a good sign). Those days are gone.
- stcredzero 19y ago>...the blazing speed and low overhead of Lisp... Actually, there are some Lisp implementations that leave Ruby in the dust. (Not saying much, I'll grant you that.) There are some Lisp implementations that let you compile code to machine language. sigh yet another clueless spreader of programming urban legend and old prejudice!
- deleted 19y ago[deleted]