Live data from Hacker News

Ask HN: Why Python over Ruby?

news.ycombinator.com

11–20 of 198 posts

Re: Ask HN: Why Python over Ruby?

#11
post #7

For me personally, it boils down to me liking the library more, the syntax more and the common programming styles. Ruby is very hard to follow me due to the (imho) overuse of meta-programming and using language constructs that obscure the actual meaning of the program. Patching objects and being overly clever with language features makes ruby code harder to read. It's also, to me personally, a lot faster to whip some…

I find ruby more intuitive. I learned python first but switched over (not due to rails, just enjoyed ruby more). It sounds like you are complaining about the meta programming in the Rails code more than any intrinsic feature of ruby the language.

Re: Ask HN: Why Python over Ruby?

#12
Python got popular earlier - it was already gaining significant converts in the early part of this millennium, and the later years of the last one. Ruby only really took off when Rails started to get popular. But it has really taken off, in a way that I think sometimes makes the Python guys (who have been slowly and steadily gaining ground) a bit jealous.

They're both good languages with good communities though. Each has a few advantages and disadvantages, but they're similar enough that if you know one you should probably stick with it and be happy, and pick something farther from the tree as your next language (Erlang or Scala, say).

Re: Ask HN: Why Python over Ruby?

#13
post #6

Earlier quoted context omitted.

I don't think performance is holding ruby back I think that libraries especially mature and massive libraries, or lack thereof, is holding ruby back. Not to say people aren't working on it give ruby some time it will probably catch up especially with rails but just not right away.

Performance has always been a finger in Ruby's eye, but with 1.9 that doesn't seem the case. Regarding libraries; you are right. Ruby has a lot of code out there, but much of it is in random repositories maintained by random people. Hopefully this changes.

Though it must be said, rubygems is miles ahead of anything available for python.

Re: Ask HN: Why Python over Ruby?

#14
Personally I like generators, generator expressions and list comprehensions much more than the Ruby equivalents (chaining each/filter/etc). Python is cleaner overall, and if you want metaprogramming you can still do a lot of it. Also Python has better libraries and runs on App Engine.

Re: Ask HN: Why Python over Ruby?

#15
Python is far more mature, isn't a strange ad-hoc combination of other languages, has a third-party library to do anything and everything (which is probably also reasonably mature), and doesn't have a community rife with arrogant children.

I'm generalizing to some extent, of course, but these are the things that I and other developers I know associate with Ruby (including many who's startups are built on it). I imagine as the language and community grow and mature they will shed these associations and hopefully create a language worth taking seriously. They haven't done that yet (strictly in my opinion).

Re: Ask HN: Why Python over Ruby?

#16
I prefer the design of Python over Ruby. I'd be hard pressed to explain why -- something vague about Python being straightforward yet graceful -- but that aesthetic preference is enough to sway me.

Re: Ask HN: Why Python over Ruby?

#17
post #4

I haven't really looked at Ruby that hard, but from my perspective as a reformed Perl user I found Python's syntax to be very clean and well organized. On the surface ruby looks more Perl-like to me, more clutter, not as easy to read as Python. Having found Python, I really don't feel a pressing need to learn another scripting language. Instead I'm working on Objective C.

Although I'm a Python programmer, I urge you to take at least a cursory look at Ruby. It's actually very different from Perl.

Ruby borrows some stuff from Smalltalk. You know what other language borrows heavily from Smalltalk? Objective-C :)

Re: Ask HN: Why Python over Ruby?

#18
From the Python website:

"Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language."

When I first saw this, I went "Google? Whoa. I gotta check this out" :)

Re: Ask HN: Why Python over Ruby?

#19
Python has IMHO better support for GUI toolkits - Tk support in main library, PyGTK+, PyQt. And two more words about library - import antigravity :).

And strong company backing: Google has have hired some of the core Python developers, and some of its infrastructure is written in it... Flumotion with its streaming media (although codec stuff is mostly gstreamer, but most of the networking stuff is in Python)

And the final straw - Python just seems to be a bit more beginner friendly...

Re: Ask HN: Why Python over Ruby?

#20
post #13

Earlier quoted context omitted.

Performance has always been a finger in Ruby's eye, but with 1.9 that doesn't seem the case. Regarding libraries; you are right. Ruby has a lot of code out there, but much of it is in random repositories maintained by random people. Hopefully this changes.

Though it must be said, rubygems is miles ahead of anything available for python.

Can you explain more? Is there better native packaging (deb/rpm) etc support?
Post reply on HN