Ruby is a scripting language and I've been using it nigh unto a year now. It is currently my favorite scripting language and it was so practically from the first day I started playing with it. You can find plenty of advocacy, zealotry, demogoguery, and fanatacism in the usual places online; I'm sure even more if you can read and understand Japanese. Fortunately for me I did not see or read any of that online bantering about how "my scripting language can beat up yours" when I decided to play with it, only enough about it to give it a try.
Two things sold me on it immediately:
- Nice data structures
- The presense of "=~"
Enter Ruby, which upon first encounter appears to have the best of both worlds. Oh joy! I got busy with it immediately. It also had an interactive mode like Python, something Perl really needed. With a bit more experience, I discovered and began to appreciate some of its other and even novel features:
- Truly object oriented in presentation (even the number 1 acts like an object) which adds a kind of consistency.
- Interesting use of code blocks (I didn't like lambda's in Python, does anyone?).
- Ease with which to extend even basic classes and objects.
The unfortunate aspects:
- It's still rather new (outside Japan) and so the community and support is rather smaller than Perl and Python.
- The syntax and keyword naming is a mite unfortunate and takes some getting used to. But at least it doesn't strongly rely on syntactically significant white spaces like Python.
- It has automatic variables. You don't have to use them, and I don't mind them, but it freaks some people out. It does mean you can run cool stuff on the command line like Perl though.
- It's yet another scripting language, and there will be some inertia to overcome, especially in the staunch work environment.
- I miss Python's use of named and initialized arguments. This is almost a deal-breaker. Grrr... nothing's perfect it seems. Fortunately, that might change in the future for Ruby, and there are hacks to simulate it now but they are just hacks. I don't like the hacks though.
- At present there only a relative few books on Ruby in English. Fortunately the first one out is a great one, on par with the Camel book in my opinion.
Currently I'm the only one at my office that uses Ruby. It will probably stay that way due to the inertia problem. But I decided to continue writing and infesting the company research code with it until someday they all seccumb to my will and see the light.