[Tutor] Help deciding between python and ruby

Alan Gauld alan.gauld at btinternet.com
Fri Sep 4 19:54:11 CEST 2009


"dan06" <dan.king106 at yahoo.com> wrote

>  I'd like to learn a programming language - and I need help deciding 
> between
> python and ruby. I'm interesting in learning what are the difference,

There is lots of info on their web sites. asking a question like this is
troll baiting in a big way, any debate about languages will allways be
subjective. It is almost impossible to compare languages objectively,
even the academic researchers who have tried have usually only
succeeded in revealing what they think is important in language
design...

I chose Python for 2 main reasons

1) At the time I chose Ruby was in its infancy and almost all docs
were in Japanese!

2) Ruby uses $ signs etc to indicate variable types etc which I hate.
Python has started down that road using @ to indicate a decorator
but it didn't have any of that crud at the time I chose it. (around 1998)

But I almost moved to Ruby after the Hunt/Thomas book came out.
Because....
Things I like about Ruby that I wish Python had:

1) anonymous code blocks.

Thats it. But they are so insanely well implemented that I weep
everytime I look at Python's lambdas nowadays...

However I do prefer the way Python doesn't try to insist that everything
has to be done using OOP, and that pure functional styles are catered
for too. (Ruby supports FP well but only within an OOP context!)

Otherwise there is very little to choose between them as languages
and I'd consider things like quality of support in terms of community,
web documents/tutors, 3rd party libraries etc.

And finally your own tastes and programming requirements.
What kind of programming will you be doing?

Either way its not a one way street, learn either one and you will pick
up the other very quickly. They are very similar both in style and even
syntax..

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list