Ruby is slightly newer and wasn't particularly popular in the United States until it was popularized by Rails. Python became popular with Linux and open source developers before Ruby did, and has had slightly more time to develop a nice set of libraries to do just about anything.
May I also add that Python works very nicely on a Windows box. Ruby/Rails works on Windows, but when I used it, it hobbled around on one leg. Going to PyCon this past year, I was stunned at how many Windows laptops there were. Python itself and the Python community are really quite OS agnostic. The online Python documentation tends to be pretty good. When I picked up Ruby a year and a half ago, and I tried to find th…
Ask HN: Why Python over Ruby?
191–198 of 198 posts
Re: Ask HN: Why Python over Ruby?
#192I wish Ruby were good, but it's so fucked: Matz's decision-making process He tries to make Ruby be all things to all people Lots of confusing sugar and overloading baked in I much prefer Guido's hard pragmatism The pointless panoply of function types: Methods, Blocks, Procs, Lambdas All intertwined and yielding into one another. I love that in Python there is only one: Objects with a __call__ method, defined metacirc…
Re: Ask HN: Why Python over Ruby?
#193Re: Ask HN: Why Python over Ruby?
#194For me it's very simple ! I can READ other people's Python code with greater ease than Ruby, Java, C#, C++ or even C. At the end of the day, the quicker I can assimilate library code the quicker I can use it well and the quicker the module gets completed and fully tested. Of course, with Google and Eric Raymond raving about it, the confidence factor increased further.
This is a cultural issue. In the Ruby (or Perl) community, if you use obscure language features to do a common task in a single line of code, you will be worshipped as a god. In the Python (or Tcl) community, you will be viewed with suspicion. Not that Python doesn't have one-liners (e.g. comprehensions) - just that everyone agrees which ones and when and how to use them.
Weighted use of
Search Term Hits Search Term Hits obfuscation"obfuscated perl" 1390 "perl programming" 164000 0.85%
"obfuscated python" 234 "python programming" 157000 0.15%
"obfuscated ruby" 269 "ruby programming" 133000 0.20%
If I use the word golf, I get:
Weighted use of
Search Term Hits Search Term Hits golf"perl golf" 1780 "perl programming" 164000 1.09%
"python golf" 171 "python programming" 157000 0.11%
"ruby golf" 547 "ruby programming" 133000 0.41%
This is of ccourse, the same statistics that fueled the last financial meltdown :-)
Re: Ask HN: Why Python over Ruby?
#195Ruby is slightly newer and wasn't particularly popular in the United States until it was popularized by Rails. Python became popular with Linux and open source developers before Ruby did, and has had slightly more time to develop a nice set of libraries to do just about anything.
May I also add that Python works very nicely on a Windows box. Ruby/Rails works on Windows, but when I used it, it hobbled around on one leg. Going to PyCon this past year, I was stunned at how many Windows laptops there were. Python itself and the Python community are really quite OS agnostic. The online Python documentation tends to be pretty good. When I picked up Ruby a year and a half ago, and I tried to find th…
Come to think of it, we, ruby programmers, don't really pay our dues. 1.9.1 has been out since January/February, and nobody bothered to package it for OSX, Windows, or Ubuntu.
Thanks for bringing this issue into the light.
Re: Ask HN: Why Python over Ruby?
#196Re: Ask HN: Why Python over Ruby?
#197Earlier quoted context omitted.
I currently use Python and Django for the following reasons: 1) Coworker familiar with Python 2) I had an easier time understanding the mechanics of Django than I did Rails 3) Some libraries I needed were only in Python However, from a language point of view, I have a slight preference towards Ruby. Here are some things I like: 1) More consistent commitment to object paradigm, e.g. all function calls are actually met…
Humor me for a moment, because I've been asking this question of many people for a long time and have never yet gotten a straight answer. Why is len() always the thing people pick on? Why is it always "Python uses len(obj) instead of obj.len()", and never "Python uses str(obj) instead of obj.str()", or any of the various polymorphic built-ins like sum()? I've seen this so many times now that I'm honestly quite curiou…
>>> type(str)
That is to say, str isn't a magical function, it's a type, and "str()" is how you call that type's constructor. How is this not somehow object oriented?Of course, even if str was a function and not a constructor, it would be an object factory which delegates to its argument via a well defined interface (the __str__ method). OOP doesn't have to mean everything-is-an-object.
Re: Ask HN: Why Python over Ruby?
#198Earlier quoted context omitted.
Quoting an article on the topic: Having ploughed through several tutorials, I did not find Ruby particularly "elegant", or its syntax particularly obvious. Much of it seemed ad hoc, thrown together, in particular when there were several different ways of doing something, and it seemed to be the philosophy of the language to provide all of them. I did not find its constructs as intuitive and natural as claimed, trying…
Re: "5" 2 == "55" vs. 2 * "5" == Exception* You need to remember that EVERYTHING is an object, there are no basic/literal types at all; in this case, "5" is really just syntactic sugar for creating a "5" String object, 2 is syntactic sugar for creating the "2" Integer (Number?) object, and the " * " operator is syntactic sugar for the " * " method of the "5" String object == ' "5".times(2) ' (which is similar to Perl…