Fog Creek Software
Discussion Board

Python or Ruby?

vote and explain...

Thursday, August 21, 2003


I simply don't have the time to play with programming languages that don't have any marketability factor to them.

Thursday, August 21, 2003

Horse hocky.  To the original poster, what are you after?  It could be neither is your best choice.  That said, I chose Python simply because most of the Ruby docs were in Japanese.  Python is a great language, in it's niche.  Much better than Perl, awk, or bash.  But if you're looking to do DSP processing, or real time stuff, or anything time critical, look elsewhere.

I did perl for a year.  Loved Regexps, hated perl.  I've done bash for years, always had a problem remembering the syntax.  Am very good at sed/awk, but they have their limitations.  IMHO, now that I know Python I'll never write another awk/sed/bash script in my life.  Haven't written a perl script in 3 years, and haven't regretted it.

Friday, August 22, 2003

Out of curiosity what did you hate about Perl?

Matthew Lock
Friday, August 22, 2003

I like Python and it likes me.

Clutch Cargo
Friday, August 22, 2003

Hey Snotnose

At least Ruby doesn't have a Jap syntax.... don't give it a miss cause there are only books available in Japanese , which by the way is not true . You can download a whole book of the internet plus I know of 4 other publications written in English. Worthwhile having a look at it. Lots of sites on Ruby...

Nigel Soden
Friday, August 22, 2003

The same question has been discussed for weeks in comp.lang.python and comp.lang.ruby (and the discussion wasn't always pretty). Read it in and 1) realize that it depends on too many factors to be answered without knowing more about your situation, including a psychological profile of everyone in your team and 2) this is a really stupid question to ask in a public forum.

Friday, August 22, 2003

Yeah, how about some more questions like: Windows or Linux?  Open or Closed Source? C++ or Java? Static or Dynamic typing? Braces at the end of the line or on their own line?  Is Microsoft a monopoly?


Friday, August 22, 2003

"Yeah, how about some more questions like: Windows or Linux?  Open or Closed Source? C++ or Java? Static or Dynamic typing? Braces at the end of the line or on their own line?  Is Microsoft a monopoly?


You forgot outsourcing offshore...?

i like i
Friday, August 22, 2003

vi vs. emacs

Friday, August 22, 2003

Mountain Dew vs. Jolt

John Doe
Friday, August 22, 2003

Hulk Hogan vs Andre The Giant

Rowdy Roddy Piper
Friday, August 22, 2003

Johnny Bravo
Friday, August 22, 2003

Sorry, I wasn't slamming Ruby.  But part of my eval was "how much documentation is there".  Docs written in Japanese don't count for me, YMMV.  Python had boatloads of docs.  That said, the only Python docs I ever used was the online "Dive into Python", and the book "Learning Python".  It was pretty easy to learn.

I hated perl because I could never remember if I wanted $_[, _${0}, or !$%*@^.  Figuring out someone elses code wasn't easy.  Figuring out my own code 2 months later also wasn't easy.  It's a write only language.

And yes, I *am* slamming perl :)

Friday, August 22, 2003

I like the Python language, but I use the Jython
implementation.  It combines the loveliness of
Python with the power of all the JDK classes. 
It's like Tcl/Tk, only bigger & better & cleaner.

but ruby's nice too
Friday, August 22, 2003

Ruby now has full complement of docs, plus the excellent 'Programming Ruby - the Pragmattic Programmers Guide,' by Andrew Hunt and David Thomas.

Now available on the web for free:

Ged Byrne
Friday, August 22, 2003

>I hated perl because I could never remember if I wanted $_[,
>  _${0}, or !$%*@^.  Figuring out someone elses code
> wasn't easy.  Figuring out my own code 2 months later also
>wasn't easy.  It's a write only language.

The default variable $_ and perl's seemingly weird symbols are it's best feature.  Think of them as brevity to save you typing.

I love the way in perl you can go:


and out will come 1,2..10. Heaps more readable than:

for( int i=1; i<11; i++ ) {
    print i;

Oh well all the more perl for me!

Matthew Lock
Friday, August 22, 2003

I actually like Ruby better than python. I'll offend everyone and say Ruby is to python as C# is to java in the sense that python has more warts and Ruby just feels cleaner. But I know python and I am aware of all the tools and libraries that I need. With Ruby, I'm just ignorant about some of those things and if I had the time (or as was said if it was marketable), I'd be all over it.

I actually do mostly java.  Marketable. But it shows it's age. C# is better and marketable but I won't switch for the same reasons I won't switch to Ruby. Yet.

fool for python
Friday, August 22, 2003

fool for python- what set of tools do you use?

python apprentice
Saturday, August 23, 2003

I'm curious what "warts" you have experienced with Python.  I'm also curious whether perhaps you haven't used Ruby enough to *find* the warts yet.  ;)

For me, the one minor nicety that Ruby has that Python doesn't is Smalltalk-style code blocks.  But, there are so many things that Ruby does that are a step backwards from Python, that the trade isn't anywhere near worth it.

For example, Ruby allows modification of built-in types, which is a horrendous *mis*feature for application scalability.  It's one of those things that sounds like a good thing until somebody actually does it.  Then you wind up with two libraries that modify a builtin type in different ways, but your app really needs to use *both* libraries.  Then where are you?

Also, I find Ruby syntax to be almost as ugly as Perl, and of course there's the libraries issue.  If the language itself multiplied my productivity enough to make up for those issues, that'd be one thing.  But the only thing I've seen in Ruby that's not in Python is blocks, and they're just not that much of a productivity booster relative to using closures in Python.

In short, my reaction to Ruby is basically, "Why bother?"

Phillip J. Eby
Saturday, August 23, 2003

apprentice, I use pyxpcom, komodo, twisted and some of the 4suite stuff.

I have not used Ruby enough to discover the warts and after reading the blog post below, I agree that someone spilled some funky perl on it.

fool for python
Saturday, August 23, 2003

I've made the same observation about Ruby as that Industrie Toulouse article; I don't respect that Unix shell tradition of lots of meaningful punctuation.  Python fulfills a need for good syntax that many people can easily join in on.

For brevity, I'd look towards Common Lisp macros.  I can deal with an extra couple parentheses.  I can also live with needing a better IDE with Python to get around those times when you do a little too much hand-typing, since it's a highly usable UI.

As for Ruby, Alex Martelli made a recent post on comp.lang.python that Ruby takes an interestingly extreme view towards enormous configurability, that Python holds back on because it's rather risky for large projects.  So I can see Ruby could be useful if that's a situation you need, but for me it's unlikely to need to go there.

Saturday, August 23, 2003

It depends on what your primary need for it is.

My original question was perl, python or ruby.

I went with ruby because out of the three it appealed to me the most, plus I got influenced by the pragmattic programmers view.

The main downsides of ruby for me are that the win32 specific stuff is not nearly as advanced as pythons, and being a younger language / lesser used language, there is a smaller, less mature amount of libraries compared with the likes of CPAN etc.

So if win32 stuff is fairly important, I'd definitely go with Python.

Otherwise, play with both and decide whether the maturity of python outweighs its whitespace requirements _ __ self and other OO annoyances. Ruby OO just works, makes sense, and is always joy to use.

Just in case anyone cares - the 'perl'ish syntax in ruby is all pretty much optional - there are english equivelants for nearly everything. About the only ones I personally use are $` $& $'  (and occasionally a couple of others) for regular expression matches as they're simply more convenient.

You can write obfuscated code in ruby, but you still have to go out of your way to do it.

Gordon Hartley
Tuesday, August 26, 2003

Python's "whitespace requirement" is a *feature*, as is explicit self.

Honestly, even before I learned Python I found it incredibly annoying to read C++ or Java code that didn't use explicit 'this'.  Python was a breath of fresh air in that regard.

So what about those "other OO anoynances" you're talking about?

Phillip J. Eby
Tuesday, August 26, 2003

*  Recent Topics

*  Fog Creek Home