Jogin is turning out to be a guy of my liking. First he picks my platform of love, then he picks my language of love:
Ruby has two things going for it which makes me (want to) choose it over Python for web development. The first thing is that it's really and truly object oriented. Python's OO feels kind of like an afterthought, most likely because it is one. And even though the OO aspect is glued onto Python rather neatly, it doesn't permeat the language like with Ruby.
But, even still, that doesn't level Ruby with Python. What settles the matter is Rails. I'm willing to code Ruby, even though I prefer Python, because of Rails. If everything falls into place, I'll be doing a respectable amount of development using Rails in the future. Assuming that I'm not hit with a violent jolt of aspiration resulting in something similar in Python.
UPDATE: Ben Stiglitz also had a similar note saying "...a lot of people are moving over to Ruby because they want to play with Rails".
Challenge by matthew on August 05, 14:19
hi, i was on a forum, asking "python vs. ruby" questions, and got this reponse, which I'd be curious to hear your response to --> thanks
---> from the forum....
1) it does not feel as mature and professional as Python - for example the documentation is far more patchy, and some of it has a definite "japanenglish" feel.
2) Similarly, there is not the same breadth of libraries that Python has.
3) it is very much unix-centric. While there is a good Windows port the language is very unix oriented, so windows programmers may feel like second class citizens. Python feels much more platform neutral (I believe the early versions were developed on a Mac).
4) It is significantly slower than Python, although this may have improved in more recent versions.
5) It uses a lot of the Perl context-dependent shortcuts, which can make the code much shorter but also less readable. Perl fans may see this as a big plus.
6) It uses Smalltalk-like code blocks. This is a huge plus, and something I would really like to see in Python. Generators go part of the way to providing this functionality, but still leave a lot to be desired. It is worth learning Ruby just for this.
Overall, if Python did not exist I would definitely be programming in Ruby. However at the moment I feel it does not offer enough to tempt me to switch.
1) It's hard to argue with feelings — especially when the charge is so fuzzy and, imho, meaningless. What does professional mean exactly? Is it a question of enterprise word bingo? Then why not "upgrade" to J2EE? Anyway, there's no reason to take the word of someone else with the documentation. Have a look for yourself. I've listed the important resources on Getting started with Ruby. I don't really recognize the "japanenglish" charge from my daily dealings with the language.
2) Oh really? Which libraries are you missing? Be concrete or don't be at all. I could carry the same charge against Python: There's no Rails? How could this language be mature for web development. (That would of course be silly, just as silly as the original charge).
3) The Windows port is currently easier to install than to upgrade Ruby 1.6 to 1.8 on OS X. Ruby on Rails works out of the box on Windows. Again, offer specifics, or don't offer any thing at all.
4) Oh really? I've never seen a benchmark that was universally recognized as being "best practice" or even valid on both sides. This amounts to slander.
5) By "uses" the author means "offers". You are in no way forced to use these shortcuts. In fact, most people don't. Ruby has an object-oriented approach to every single shortcut like behavior.
6) No arguments there. Blocks are part of the core of what gives me immense pleasure when programming in Ruby.
But regardless of whether these points can be dismissed easily or not isn't that interesting. The fact is that the author has this screwed perception of Ruby. And I'd like to help overcome that. Hopefully I've started doing so with this response.
I'm afraid that #4 is true, ruby is usually slower than python. Anyway they are in the same performance block, the one "slower than C, fast enough for almost everything, and you can extend them in C in the critical spots". The ruby C interface is incredibly simple, too.
Btw there are cases where ruby is faster (http://pws.prserv.net/dlissett/ben/bench1.htm)
You better google by yourself cause RubyVSPython has been debated to death almost everywhere.
2) "There's no Rails? How could this language be mature for web development. " Have you seen Twisted+Nevow or Zope3 or Webware? Rails is cool but it's not true that Python lacks web development support or is not "mature" :)
Yeah, understood, as a Python lover (who has enjoyed a lot reading the "Poignant Guide To Ruby" and maybe one day will bridge the gap) I can't agree to what you said. Keep coding David :)
Challenge by matthew on August 06, 21:22
.... and just so we're clear, the responses were from "the forum", not me.
adieu (bless you)
Challenge by Gavin Sinclair on August 13, 7:17
David, I think your response to the "forum opinions" was a bit heavy handed. Whan I was reading them, I thought (with some of them) "yeah, that's partially true, but who cares?" I think that's a more appropriate response that "prove it or STFU!" Ruby is inferior to Python in some area; and superior in others. That will always be the case. In the things that matter to me, Ruby is far superior.
At this moment Python may be more famous because of BitTorrent. Ruby may be the next because of Rails. But this don't mean to beat Python back. Both Python and Ruby is excellent. They brought programming to newbie as me. I had read C++ and Java books... they just turn me OFF ) |