A couple of weekends ago I finally got my feet wet with Ruby on Rails by following along with this OnLAMP tutorial. I didn't even finish the walk-through (yet), but I'm super-impressed. Rails and Ruby both seem to be incredibly powerful, easy, and fun. Now I find Amy Hoy's review of / supplement to the OnLAMP article, which fills in some holes and give you some of the "why" behind the examples. It also does a nice job of summarizing the experience of playing with the new language:
... Ruby (not just Rails) has very lax rules when it comes to syntax. But without an explanation, you might not immediately realize how lax. (Hint: The answer is 'very lax.')
You don't have to use semicolonsâ€”but you can. You don't have to use parenthesesâ€”but you can. You don't have to use curly braces on code blocksâ€”although, of course, you can. Variables don't start with $, either, unless they're globalsâ€”but they do sometimes start with @ as we've seen.
I used to wrinkle my nose at code with so few constraints, especially the lack of variable signifiers (mmm, I like associating coding with $$$!) in languages like Python and Ruby. But I was wrong, and perhaps just a tiny bit scarred by my PERL experience. But Ruby is gorgeousâ€”spare like a Japanese tea room, as functional as a Zen studio. I want to marry Ruby and have its babies. But I have the feeling that a language like Ruby lives a life that resembles its syntax; I'm sure it's not looking for that kind of emotional entanglement. Somehow, I soldier on.
Good stuff. Someday I will spend some more time futzing around with this junk. I might even get the book.
Also note Justin French's experience after he switched (seemingly whole-hog) from PHP to Rails.