I hate it when I see people trying to start flame wars over this. It's dumb. Ever noticed how Python users and Ruby users are, as a general rule, not really interested in moving to the other language?
It's because they fulfill the exact same need.
- Object orientated? Check
- High level? Check
- Support functional programming? Check
- Garbage collected? Check
- Dynamically typed? Check
- Expressive? Check
- Fast to develop in? Check
- Small, usable standard libraries? Check
Yeah, Ruby has closures, you can do the same stuff in multiple ways, it has Ruby on Rails, it has code blocks, and it has symbols, and Python's faster, does threading , unicode, has more web frameworks than keywords, has more third party libraries and the standard library is better documented, but honestly, this stuff only matters when you're deciding which one to invest your time in; that is, before you've learnt either.
Once you've made that time investment, there's no additional gain to be made from learning the other for the sake of it.
If you're a Java programmer, whom Ruby's community seems to be targetting, I'm sure that Ruby is pretty damned impressive. Any dynamically typed language has got to feel like heaven after Java. Ex-Java programmers seem to like Python too.
Once I've got Python or Ruby down pat, I don't need the other.
Let's run over it again
- They fill the same niche
- They have the same functionality
- They have similar communities (Usually helpful, occasionally frosty, always passionate)
- They've both been the Next Big Thing (Yeah, I'm using past tense for both, sorry Ruby dervishes)
- They're converging
So, STOP EVANGELISING. I'm looking at fervid Pythonistas and rabid Ruby lovers both. It's inane, and you're wasting your time, and ours.
Footnote: I'm generalising, so please don't tell me about your conversion either which way - what I'm saying holds true for the greater majority of both communities, there will always be exceptions.
26 comments:
Python has closures too. Not scoped the same as Ruby or JavaScript, but they're still there.
I am looking for the javascript fans to start!. Where are they? Javascript has all those features but alas no great libraries.
Bob (above) might disagree that there are no great JavaScript libraries. ;-)
Python does NOT have closures, at least not anonymous ones like real languages have.
Ruby has plenty of warts, but it's going leaps and bounds ahead of python now. Python suffers from poor leadership and a poor community.
I don't really care about either language, but if I had to pick one I'd go with Python. Why? Because Ruby is surrounded by the "graphic designers" of programming; people who's sole concern is looking the part, saying the right buzzwords but not producing the goods.
Python has anonymous closures, they're just limited to a single line. Also, python's weird scoping rules mean that you can't mutate closed-over bindings. Not that Ruby doesn't have its share of scoping weirdness as well.
Ruby has plenty of warts, but it's going leaps and bounds ahead of python now. Python suffers from poor leadership and a poor community.
Why are you trolling my blog?
Your statement about poor leadership baffles me, but nevermind. Perhaps you mean you disagree with Mr van Rossum's decisions, not that he can't make decisions.
But your statement about the community is just out and out wrong. Just off the top of my head, I'm part of the Python Tutor, wxPython, Pythoncard, Pysqlite, and IronPython mailing lists, and tonight I ventured into a Plone chatroom to ask some questions, and I've never met a bunch of nicer people - and when you unfairly malign nice people because of the programming language that they use (as your statement about an entire community is obviously based on a faith based world view rather than facts) that I can only assume you're a born again Ruby user.
Which makes you the _exact_ demographic I've aimed this that, and yet you still miss the point.
What was my error? Did I not use enough capital letters?
s/Object orientated/Object oriented/
Your statement about poor leadership baffles me, but nevermind. Perhaps you mean you disagree with Mr van Rossum's decisions, not that he can't make decisions.
While I have only examined python from the periphery, I did notice some symptoms that could be attributed to lack of leadership. For example, take this 5 year old bug, that no one will accept responsibility for, much less fix:
http://sourceforge.net/tracker/index.php?func=detail&aid=436259&group_id=5470&atid=105470
Real leadership is about making tough decisions that may be unpopular in the short term.
In python whitespace is important, so I'm never using it.
Stupid stupid stupid idea.
What's the most noticable thing about whitespace ?
You can't see it.
So the syntax of python is dependant on things you can't see.
Genius idea, way to go, head of the class.
Beeeeeeep..........
In python whitespace is important, so I'm never using it.
Stupid stupid stupid idea.
Actually the use of whitespace makes the resulting code very easy to read. Coming from PHP to Python I now dislike looking at my old code and how ugly it was not being aligned perfectly. Using tabs for indentation doesn't slow you down any when coding.
the argument is extremely important; a lot of us want our bosses/potential employers/ads in dice.com to use one language and not the other, so that we can be employed all day for pay using the language of our choice.
Well, *big juicy raspberry* I like both Python and Ruby, so waddaya know about that? But I've used Python more, and have mostly just played with Ruby a little bit, still need to "learn it gooder" before I have confidence in it to stake a project on it, but the day may come. And I'm not leaving Python, either. To me, the only ones who are not "real programmers" are the ones feverishly clinging to one language - they are like carpenters with only one tool in their toolbox!
Javascript, I'm watching it. It's taken years for it to crawl out of it's hole and gain some respectability, but every time I look at it now, it's getting easier to do things with it besides annoying the spinach out of people.
I used to be a Python fan. I mostly do Java. I like Ruby better than Python these days. Mostly because sometimes practical (easy value insertion in Strings) beats pure, if not take too far. And because block closures rock.
I like Python's indentation personally. It has slightly better namespacing than Ruby, too, but both stink in this category. Why can't I _conveniently_ import without messing up my namespace.
But still, Ruby blocks vs. Python's lame closures makes Ruby better for me. They're really that nice.
Anyway, those are my thoughts. Even though Python's nice, too.
In python whitespace is important, so I'm never using it.
bar
Biggest strawman ever.
Ever used XML? Guess what. By default, whitespace ends up as freaking data in that.
is different to
bar
no-one should care
But they do!
Lilliput and Blefuscu
Dude, we're supposed to talk advice from a Python user? You guys don't even have a freaking switch statement. Join the eighties, bucko, then we'll talk!
Agree with cynos
Because Ruby is surrounded by the "graphic designers" of programming;
*irony_switch_on*
Yes, you're right. Ruby is surrounded by sales people selling the Buzzwords and Web2.0 having no idea what they're talking about
*irony_switch_off*
Somebody please disable the anonymous comment function
So the syntax of python is dependant on things you can't see.
Please stop making jokes, my abs start to hurt. Ever heard of editor indentation?
You guys don't even have a freaking switch statement. Join the eighties, bucko, then we'll talk!
Give me a break..
I do have experience in both langues on real projects. They both have their advantages and drawbacks. Learn not to hate a languange (and no, I'm not some sort of tree-hugger), learn to appreciate language features and understand that sometimes the problem might not be the language itself, but your ability to wrap you head around a concept.
And stop trolling the comments.
I've been an active member of the Ruby community, and I have to say, I hate that people like the person above are allowed to speak in favor of Ruby.
Cynos: Kudos, your post is spot on. We need to stop ripping on each other. There are a lot of things that I feel Ruby does in a more clean way, but there are a LOT of things we do not do as well.
As for leadership, which Rock did you crawl out from anyway? The Python community has a much stronger leadership than Ruby. Just because someone didn't fix your bug does not mean that the leadership is lacking. I've admired the entire Python group. I've had the pleasure of meeting Adrian of Django, and wish to god he could take over Rails.
We are extremely lucky to have someone like Matz who developed the language. We are blessed by good people like Dave Thomas to help us spread Ruby. However we have to put up with the immaturity that is the Rails team. We have someone who wrote a very usuable web framework who now thinks he knows how all companies should be developing. You call that leadership? It is nothing more than an imature kid who has been blinded by geek-fame. You don't see Adrian out there posting slides that tell people that an MIT license means that we 'don't owe you shit', or posting up a slide that says fuck you.
Pleas crawl back in your hole, stop wasting the time of those wanting to develop in Python. Learn from the language instead of bashing it. Or be constructive and go fix some patches on RubyForge.
Thanks Cynos, great post.
I happen to like Ruby. I also like Javascript (hate working with different DOM implementations, though - as a side-note Dojo and Prototype are solid libraries). I also like Python (but whitespaces suck, sorry). I also like assembly (SPARC is really nice, IA32 not so much - legacy cruft is nasty). Naturally I like C. C++, ah, not so much. LISP is beautiful and so is Scheme (of course). Java and C# are pretty much one and the same and I don't like either of them. I have written more Perl (and fixed even more perl4) code than I care to mention. I've also done more PHP, VB, ASP work than I'd care to mention in polite gatherings.
People who scream that one particular language is THE ULTIMATE!!1! should get out more (and by that I mean write more code in different languages).
In the Python vs Ruby debate, I find that Ruby is better *for me*. It happens to have structures and capabilities that more closely mirror the way I think about code. But that's personal.
Perl has Larry, Python has Guido and Ruby has matz.
In case you don't read matz' writings, he's always talking about things he doesn't like in Ruby, asking for feedback on how to improve things, pointing out things he likes in other languages. To top it all off - he responds to writings by programmers that don't like aspects of Ruby (which rubs a lot of people the wrong way - cue pointless flamewars) and AGREEING with them if they make valid points. This is the guy who gave a presentation on Things That Suck In Ruby.
Ruby is a wonderful, wonderful language. I love it to pieces. The only things I don't like are unicode support, execution speed and some syntactic sugar (all of which are being worked on).
One other thing that bothers me is the same thing I encounter with every other friggin language. The zealots that seem to have little or no experience writing production code in any other language than the one they're defending.
Get out more.
I'm glad you made this specifically Python vs. Ruby. Other people have made the same argument, but about language choices in general. That language choice just doesn't matter. This just isn't true. Or people argue that all language preferences are inarguable questions of aesthetics. Ruby vs. Python specifically is a question of aesthetics because they are almost the same language. This isn't generally the case when comparing languages.
It's amazing the number of posts that are like this:
Guy #1: People really need to quit ripping on someone else's language of choice. I mean, really, why rip on Python when it's so great and Ruby sucks.
OR this...
Guy #2: These flame wars are pointless, so let's just stop fighting. I'm sure there's a reason why people like Python, but Ruby is far superior.
You see, we all have our biases and most of the people reading this are passionate about Python or Ruby. Personally, I'm for Ruby, so I'm going to put in a shameless plug for Ruby. Why? Because it's fun to use, practical rather than theoretically superior, and it doesn't do that funky white space thing. Plus, it has one incredibly popular and well-designed web framework, rather than a gazillion mediocre frameworks that will never have a large following. I think Python is an incredibly clean, well designed language, but that's not what people want. People want something that's fun, practical, and popular with a lot of forward momentum. Python may be a better language than Ruby right now, but that's simply not enough to make it into the future.
>example, take this 5 year old bug, >that no one will accept >responsibility for, much less fix:
>http://sourceforge.net/tracker/index.php?func=detail&aid=436259&group_id=5470&atid=105470
Is this particular bug not present
in ruby?
Handling of spaces, quotes (single
or double) in arguements to
programs is awfull in windows,
and as ruby is mostly developed
on unix, I very much dought that
ruby has solved thi.
I am a ruby guy, and I must say that Python whitespace isnt SOOO bad as some people here say.
Yes, I do agree with anyone that says a language shouldnt bother about whitespace. But I also agree that the whitespace really DOES make it easier to read code.
What annoys me in whitespace is copy/paste.
In python interpreter, the code gives me errors.
In ruby irb, the same code that i copy/pasted (ruby code of course), works, and it doesnt
care about the whitespace.
If python would fix this one issue, then I'd not mind whitespace at all.
I must correct one thing though:
"Once you've made that time investment, there's no additional gain to be made from learning the other for the sake of it."
There are some python wrappers without ruby wrappers. At times its beneficial to understand python code, cuz it'll be easier for you to understand it, if you wanna port it to ruby.
Personally what I dislike about python most are these things:
* needed self. usage
* required .method() invocation
* no real favouring of some.method.chaining
(i really HATE something like strlen(bla) when
bla.size or bla.length should be the real way IMHO.
Note, thats my personal opinion, and i
never have a huge problem with python.
Unlike php, python is a real language.
And it doesnt have the suckiness of perl
syntax ;)
Both languages are trying to fill the
same niche. Yet.
Python was created by a Dutch man.
Ruby was created by a Japanese man.
C++ is the best :P :P :P
Post a Comment