Why do I use Ruby? What makes it different or better than other languages like Python or PERL or Java or C? There is no short answer. Java, PERL, and Python were all steps up from C since they incorporated things like garbage collection, which greatly simplifies the work of a programmer. But why should a python programmer switch to Ruby?
Two reasons spring to my mind. the first is that Ruby is completely functional, while still being object–oriented. That means that things that are usually statements in languages like Java or C or even Python like if, while, for, etc., are actually expressions in Ruby. So you can make use of the contents of an if expression without the need for spurious variables or funny return statements. Also, all functions return their last evaluation, which eliminates the need for most return statements.
The second important thing is that Python, while being object–oriented to an extent, is not as object–oriented as Ruby. Python numbers are merely numbers, requiring functions to manipulate them. Everything in Ruby is an object, even numbers, literals, and temporary things like parameters. So a statement like:
for each i in some_list
puts i
in python becomes:
some_list.each{|x| print "#{i}\n"}
in Ruby. Notice that, while the statements are about the same length, there are several differences. First, Python makes heavy use of keywords. For, each, and in, are all keywords and are therefore part of a fixed syntax. Ruby's example, on the other hand, makes use of a method call. In fact, almost all "statements" in Ruby are in fact method calls. There are very few keywords. Also, Ruby makes heavy use of blocks, something it borrowed from Smalltalk. These make iterator programming so simple that it's fun.
What does this all add up to? Ruby is a language that—in my opinion—stays out of my way while I code. I can concentrate upon the program and the design, with only a minimal amount of compiler–worship. I can say from my own personal experience—programming in a plethora of different languages—that I have the most fun when I write in Ruby. It's the nicest and most expressive language I have used to date.