Earlier quoted context omitted.
I have used both, Python more than Ruby. Python's iterators are more usable in many situations than the Ruby block system. I can return an iterator, stick it in a variable, call another function with it that returns another iterator, and so on. Python's classes also seem cleaner and less magical than Ruby's. For example, a method on a class is just an attribute that happens to be a method. Much more intuitive than Ru…
Everything is an object in Ruby, including the blocks. I'm not clear how you can't pass around a block -- or is it the block + iterator metadata you're talking about? I suspect that's just an experience problem, where Python promotes iterators over lambdas so lends itself to a different style of programming; I'm not sure how often you'd want/need to pass a full iterator around in Ruby. Personally I find blocks far mo…
Ask HN: Why Python over Ruby?
161–170 of 198 posts
Re: Ask HN: Why Python over Ruby?
#162I submit that Python is more popular in this space because:
- many end users will be users of the package first, and programmers very much second. In this case a very gentle learning curve is more important than ultimate expressivity for hackers.
- In the same vein, it superficially looks more like BASIC than Ruby does
- The C API may be simpler to use than the Ruby interpreter, though never having used Ruby's C API that's speculation on my part. Never understimate implementor laziness as a technical driver.
Re: Ask HN: Why Python over Ruby?
#163Earlier quoted context omitted.
Why is that? It can easily be proven. I'm not trying to suggest that everyone who uses Ruby is an arrogant child as I even have friends who certainly don't fit that bill, but when you have an especially abrasive attitude like that within a community, it only takes a minority to sour the majority. And while it certainly isn't a fault of the language , it definitely influences it usage for some people.
Umm....and have you ever spent anytime time in #python? Some are helpful, but there are a choice few who I would describe as arrogant children. In any community of size, you get good seeds and bad seeds. Python is not immune to this.
Looking at some of the drama and prima donna action in the Rails community (from a distance) just made me sad and grateful that my corner of Python (scientific computing) doesn't have those sorts of issues.
Re: Ask HN: Why Python over Ruby?
#164Python 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 imagi…
"Python is far more mature" How so? It's mot like Python is 10 or 20 years older, so how do you determine the "far more" part? And of what value would this difference in maturity be? COBOL is "far more" mature than Python. Is that a big win for COBOL? Once a language reaches some reasonable age and general wide-spread usage, points about maturity seem silly. (On reflection, I suspect you're just trolling.)
On the flip side, I am not aware of any significant impact of Ruby in commercial development that is not web-driven. When we bid on projects and talk to prospective customers, we're typically making a case against Java and C++. I can't recall a single instance where someone seriously asked us about Ruby. (We've had more inquiries about KDB and K, that abomination of a language.)
So, just my $.02 as a scientific software developer.
Re: Ask HN: Why Python over Ruby?
#165Earlier quoted context omitted.
How does python compare to ruby in terms of web development? I get the impression that there are more 3rd-party libraries in Ruby, so it is easier to get web code up and running with ruby.
I think this impression comes from the culture of experimentation in Ruby and more widespread willingness to adopt new tools and libs very quickly. Python definitely has a diverse web development community and more options in some areas (like templates), but it's more conservative, not necessarily evolving as rapidly and, like Python overall, resists influence from other languages. For instance, Haml and Saas are pre…
Python is such a large tent that it's quite inaccurate to say that "the Python culture" lacks a sense of experimentation and adoption of new tools. What you might be getting at is the fact that there are already so many existing libraries in Python for doing most things that there's not a lot of public reinvention of wheels going on.
Re: Ask HN: Why Python over Ruby?
#166I think it's mostly about maturity, of the runtime, of the language, and of the community. For example, Ruby has backward incompatibility issues in minor releases that would never be permitted in Python. They had to jump to Python 3 for even fairly small things that wouldn't be accepted in the 2.x line. Even subtle incompatibilities between Python versions are taken seriously, and there's a documented process for dep…
Re: Ask HN: Why Python over Ruby?
#167Earlier quoted context omitted.
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.
"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." Just which Ruby community is this? None that I associate with, that's for sure. To the people who voted the OP up; is it because of your own first-hand experience with other Rubyists? For all I know there are clusters of Ruby coders who encour…
Re: Ask HN: Why Python over Ruby?
#1681. Get latest OpenSolaris. 2. Install latest SunStudio 3. download latest source of Python (3.1) and Ruby (1.9.1). 4. Try to build them with CC=/opt/SUNWspro/bin/cc" CFLAGS="-m64" 5. See the results. Run make test for ruby.
Re: Ask HN: Why Python over Ruby?
#169Earlier quoted context omitted.
I think this impression comes from the culture of experimentation in Ruby and more widespread willingness to adopt new tools and libs very quickly. Python definitely has a diverse web development community and more options in some areas (like templates), but it's more conservative, not necessarily evolving as rapidly and, like Python overall, resists influence from other languages. For instance, Haml and Saas are pre…
FWIW, there are lots of Python folks moving to git and hg as well. But I don't understand what VCS choice has to do with language culture. What's next, a critique of editor choice? :) Python is such a large tent that it's quite inaccurate to say that "the Python culture" lacks a sense of experimentation and adoption of new tools. What you might be getting at is the fact that there are already so many existing librari…
It's not remotely as universal as it was for Ruby developers. When working with Python you still can't go a day without hitting an svn repo, but with Ruby you'd easily not touch one for months.
"But I don't understand what VCS choice has to do with language culture."
A lot, and I already described it. Ruby developers and the Ruby language overall are less conservative and more open to dramatic change than Python developers or the language. Each model has its benefits.
"'Python is such a large tent that it's quite inaccurate to say that "the Python culture'"
It's a large tent, but the common thread is Python and Python's principles, and they define the culture.
"there are already so many existing libraries in Python for doing most things"
But individual developers don't do most things, each works on certain things. Python has lots of libraries, but that doesn't mean it's the best choice for any specific job. As a web developer, there are a huge number of Python packages that don't matter at all in that domain. If sheer number of libraries mattered, we'd all be using perl.
Re: Ask HN: Why Python over Ruby?
#170Earlier quoted context omitted.
"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." Just which Ruby community is this? None that I associate with, that's for sure. To the people who voted the OP up; is it because of your own first-hand experience with other Rubyists? For all I know there are clusters of Ruby coders who encour…
In Perl you have "wizards" and in Ruby you have "rockstar ninjas"... No other language communities do this.