Hi Preston,
I just started learning Ruby and a bit of Python last year, and I'll
share my experience.
Personally, I found comparing Ruby to Python a bit awkward. I read the
great Ruby Python comparisons on various wikis, but some how kept
ending up on Lisp pages (more later).
As for the direct comparison, there was the "more OO", "more fun",
"less libraries" aspect, but I really got a sense of why I liked Ruby
when I started looking at Smalltalk and Lisp.
1. most of the same language dynamic language benefits of python (a
rough and brutal summary- Perl in a readable, maintainable and OO
form)
2. more OO
3. more expression-oriented (python seperates expressions and statements).
Nothing that was earth shattering to me, but I was an OO enthusiast,
and quite liked Perl and it's conciseness, so Ruby looked nice, not
yet considering libraries, existing apps, and industry acceptence.
What really made it click for me was looking at Smalltalk and Lisp
comparisons. Ruby has been called both Smalltalk-inspired and an
infix-notation dialect of Lisp. That enables:
4. creating DSLs (domain specific languages)
A paraphrasing a comment on slashdot on the rails article today- if
Python didn't have list comprehensions already, it would nearly
impossible to add them. If ruby didn't, it would be fairly easy.
and
5. bottom-up programming to coincide with top-down. This somewhat
implies implementing a custom DSL as your program your application.
Paul Graham was useful in considering these:
Bottom-up programming:
http://www.paulgraham.com/progbot.html
What Made Lisp Different:
http://www.paulgraham.com/diff.html
Succinctness is Power
http://www.paulgraham.com/power.html
Ultimately, DSL+succintness (and indirectly expresion-orientation)
made me choose Ruby. I don't know if this is the incredible benefit as
postulated by Graham. There are links to strong Lisp people defending
Python at the bottom of articles. But ultimately, I find it fits my
mind and how I like to think about programming.
Don't know much Python yet, but plan to learn some in a few months
time permitting to compare. I'm also learning some Scheme and
Smalltalk to inform my Ruby programming.
And as for the Ruby libraries, I love them and haven't found too many
things that I'm missing for my needs.
Regards,
Nick
···
--
Nicholas Van Weerdenburg
On Sat, 22 Jan 2005 07:20:57 +0900, Preston Crawford <me@prestoncrawford.com> wrote:
I'm completely new to Ruby and Python. I'd like to learn another language
I currently know most of the Microsoft mainstays like VB, C#, ASP,
VBScript as well as JavaScript, Java, PHP, etc. I'm interested in learning
another scripting language, mostly for fast proto-typing and also because
I have a gut feeling, that at least in Open Source circles, languages like
Python and Ruby are starting to pick up steam for glueing together
applications. Now with the news on Slashdot about Rails (as a web
developer by profession) Ruby has gained my attention.
So I'm wondering, for what reasons should I consider learning Ruby? I'm a
"Big Book" type of guy. I love buying one of those tree-killers and diving
into a new language. I'm trying to decide whether my next language to
learn will be Ruby or Python. I already know a bit about what makes Python
good. So my question to you guys is, why Ruby?
Also, do any of you have a feeling as to the future of Ruby? I know these
things can change on a dime, but my main interest in this regard is that I
know many shops are considering non-web-based Open Source solutions to
replacing existing Visual C++ and VB applications. Acting as an oracle
(i.e. taking a guess ) what kind of future do you think Ruby has in
this regard?
Thanks!
Preston