Couple of things I really like about Ruby
Contents
I guess it is too early to write any more systematic opinion about the language you know less than 10 days, but after reading the Programming Ruby 2nd edition (thank you, Safari Books) I have found out that I actually do like couple of Ruby features a lot. Your mileage may vary - what speaks here is my Java/C#/C++/C/Python/Perl background and bias. Here there are my favorite Ruby-isms (so far) in no particular order:
- expressive power of the language - few lines can take you a long way
- syntax that is nice and readable, with curly brackets allowed (but not required) and without names like __something__
- classes and OOP are organic part of the language, not a hack on top of it - everything is a class
- no need to explicitly declare self in each function or bless references
- reflection which is so easy that it is almost funny - 1.class.methods - how many lines would that be in Java ? :-)
- access level control that works, not underscore naming hacks
- text processing power of Perl, without most of cryptic Perl features
- right middle point between language style dictatorship of Python and anarchy of Perl
- ability to send messages, not call methods :-) - reminds me of Smalltalk and Objective-C
- almost everything I loved about Lisp is available again ...
- multiple inheritance functionality without multiple inheritance mess - mixin's are fantastic
- gem installer - it just works
- documentation and unit tests are part of the system, not optional afterthought
I have not really reached critical mass of Ruby lines written or read and have not looked into Rails framework everybody is crazy about. As a strange coincidence, on today's Mac User's group meeting Tobias Lütke did a presentation on their product Shopify, written in - surprise surprise - Ruby on Rails. Once again - I wish I had more time ...
Author Miro Adamy
LastMod 2007-04-01
License (c) 2006-2020 Miro Adamy