From: John Gabriele Date: 2006-04-28T00:34:44+09:00 Subject: Re: Ruby for command line applications On 4/26/06, Alan M wrote: > Hi, > > I am a Linux administrator and I use Perl for scripting. > I do not develop any web applications. My programs are command line > tools. > > At this phase I am thinking to upgrade my programming language to either > Python or Ruby. > > Considering the fact that I won't develop any web application, Which one > would be a better choice for me Perl or Ruby? > > Thank you, > Alan > They're both good choices. I'm fairly new to Ruby, but here's my 2 cents. Plusses for Python: - Tends to be a consistent language (not *too* many ways to do the same thing). - Good library support. - Good written docs (command-line pydoc docs are lacking though, IMO). - Easily embeddable. Minuses for Python: - OO features seem a little trickier to me than Ruby's (bound vs. unbound methods, class vs. static vs. plain vanilla methods). - Some Python snobbishness in the community (just my opinion). Though, the majority of Pythonistas are friendly and helpful. - They put their docstrings *below* the thing they're documenting instead of above it, where nature of course intended. ;) - Personally, not fond of the whitespace-dependent code formatting (though many many folks claim they get used to it quickly). Plusses for Ruby: - Ruby seems a little more tailored for admin work than Python (since Ruby has built in regexes, easy stdin/stdout) - RDoc (documentation for your scripts comes right from plain old comments above the thing they're documenting). - Personally, I prefer its (Perl-like) string handling to Python's. Minuses for Ruby: - Lack of docs (good printed books though)