I've been playing with ruby for the past week or two and I'm quite impressed.
It seems to be a very cleanly and thoughtfully designed language that borrows
a lot of good ideas from other languages I like.
Some of my favorite features:
* pervasive object orientation.
It really is a pleasure to finally use a language in which EVERYTHING
is an object.
* iterators
I find ruby's iterators to be both very expressive and flexible. I
expect them to greatly simplify many common coding tasks.
* the consistent use of function suffix puncutation
Ruby seems to have borrowed scheme's convention of using the '!' suffix
for in-place or destructive methods and '?' for boolean predicates. I think
that this convention is a great aid to readability.
* uniform access principle
I commend matz for borrowing from Bertrand Meyer the idea that instance
variables of a class should never be accessed directly but rather accessed
through an accessor function.
* a clean and straightforward c interface api
* surprisingly full-featured and mature libraries
Perhaps due in part to the ease of extending ruby in c. With everything
from eruby to ruby-ldap, ruby seems ready for real-world jobs.
* lightweight threads
It would be nice to also have a native thread.
There are also a few features that seem confusing or counter-intuitive:
* optional parentheses for invocation of no-arg functions
I dislike this feature in perl so I'm a bit unhappy to find it here. I
suppose it might be a consequence of the uniform access principle, but the
tricks the compiler has to play to distinguish variable references from
function calls seem a bit nasty.
* strange precedence of boolean operators
Why do '||' and 'and' have difference precedence?
* inconsistent scoping rules
Why do blocks introduce a new scope but for loops do not?
* no default or keyword arguments for functions
I know this is scheduled for 1.8, but I do miss it.
* continuations
These seem far more confusing than useful to me and I know most scheme
implementations bend over backwards to implement them without completely
destroying performance.
Overall I'm very happy with ruby. I'm very pleased to discover a scripting
language that lives up to it's own claims of simplicity and elegance and I
don't see much more perl or python in my future.
miles