The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by odye]

I found the comparisons you made to various 'scripting'
languages at the beginning of the book very informative.
I'd be interested to see you make a similar comparison
to Ruby, if you could.

Note - I'm not asking because I have my own opinions,
but rather because I've been shopping around for various
scripting languages, and Ruby was left off your list. I'm
guessing this is because Ruby is only recently gaining
attention outside of Japan, from what I've read.

Thanks!
import-bot (20211) [Avatar] Offline
#2
Re: Ruby comparison
[Originally posted by daryl harms]

> I found the comparisons you made to various 'scripting'
> languages at the beginning of the book very informative.
> I'd be interested to see you make a similar comparison
> to Ruby, if you could.
>
> Note - I'm not asking because I have my own opinions,
> but rather because I've been shopping around for various
> scripting languages, and Ruby was left off your list. I'm
> guessing this is because Ruby is only recently gaining
> attention outside of Japan, from what I've read.
>
> Thanks!

Hi Todd,

The set of languages was selected based on what we thought the bulk of the
readers would be already familiar with and using. Ruby, at least at that time,
didn't make this list.

I have to start with the big disclaimer that I have never used Ruby and have
never even looked very closely at its features. Its on my list of interesting
things to do sometime (but this is a long list smilie.
So, I can't really give you a good first hand comparison. Some brief points I
can make from what little I have read are:

- Ruby has been designed as an improvement over Perl (i.e. fully
object-oriented) and in many ways appears to be very similar in capability to
Python. I would expect that most of the advantages mentioned for Python versus
the other languages in the comparison at the beginning of the book would also
apply for Ruby in comparison to those languages as well. Similarily, with the
disadvantages.

- The differences between Python and Ruby do not appear to give one any
significant advantage over the other. Ruby is reported to deliver somewhat
faster execution time (i.e. somewhere between Perl and Python). Ruby uses a
fair bit of similar syntax to Perl, so would likely be easier for a person who
knew Perl (some would say this is a bit of a disadvantage in general though).

- Python appears to currently have a bigger following, used in more places and
have more libraries available for it. Of course, itself, it isn't in the same
class with respect to these areas as C/C++, Java or Perl.

So, the bottom line is (given my currently third hand knowledge of Ruby), I
don't think I can give you any solid reasons to go with one over the other. I
think either would give you significantly more maintainable code base down the
road than if you went with Perl.

Daryl

Further Reading:

The following thread goes down a number of diversions but gives some of the
thoughts of Python adherents regarding Python versus Ruby:

http://deja.com/=dnc/viewthread.xp?AN=694317151

The Ruby website has a number of articles giving the point of view of Ruby
adherents.