Skip to content

Comment on Dear Reddit, Hacker News...parent

Comments

About section:

http://www.zedshaw.com/

I don't know you well enough to answer the second part of the question.

Ah, one of those Ruby "ninjas" who think they're God's gift because they made a website. Say no more.

Well...he did write Mongrel...so he's a bit of a "ninja."

I pretty much hate Ruby as much as any man can, but Zed has proven himself quite smart and capable, beyond "making a website".

Why, out of curiosity, do you hate it? You usually make pretty well-thought-out points, and I'm curious to hear the view of an anti-Rubyite. I just started playing with it and I'm liking it a lot.

Well, I have a tendency to be naturally adverse to anything that is incredibly hyped, so that should frame it. However, I have many complaints with the language itself and things surrounding it, so here I go, in no particular order:

- I don't like the overall community. That is not to say I do not like Ruby hackers, period -- a number of my friends fall into the category. However, I do not like the general holier-than-thou attitude that much of the community takes and the fact that they seem to spend more time talking about how fucking awesome Ruby is than they spend actually writing code. In many ways the community is young and I believe it has a lot of maturing to do. Once again, this obviously does not apply to everyone, but one of the most important attributes of a programming language (at least to me) is its community on the whole.

- I don't give a damn how "cool" a language is and this seems to be not only a general argument for it, but also a method by which many tutorials and other literature explain or introduce the language.

- I am of the opinion that Ruby is far more ad-hoc than it is elegant, and I think many are simply confusing the two. Sometimes you need (), sometimes you don't. Some people think the lack of "unnecessary" parenthesis makes the language more elegant, I just say it makes it harder to determine if something is an attribute or a method, for example. I don't believe there should be 50 different ways to do the same thing; there should be a couple different ways and one of them should almost always be considered "the best".

- What's intuitive for one person may not be so for another; it's not a universal thing and as such I do not find the language as intuitive as hyped. For instance, I find the following completely unintuitive:

    ['list',...]. each { |food| print( food.capitalize ) }
Why? Because it looks nothing like a standard for loop. In Python, I can do a similar one-line loop over a list, but the syntax is far more intuitive to me because it looks like a loop:
    for food in [...]: print food.capitalize()
There are class variables and instance variables and constants and globals and you define one of them using @@ and CapFirst for another and... it just feels like a cluster-fuck to me.

- Despite all the Ruby community hand-waving about how "Ruby can't scale is a myth" and so forth, the fact remains that it is a (relatively speaking) young language which has many significant shortcomings -- shortcomings that even its own creator acknowledges. Except, many try to ignore these when they shouldn't.

Do I think Ruby has nothing going for it? No. Do I think it has no hope of improving and growing? No. I do, however, believe that it has a lot of growing, improving, and maturing to do before it is even half as godlike as so many feel it is (or just feel they need to say it is). That being said, I don't think I will ever use Ruby -- for these and other reasons (this is already too long). I imagine I will at least be civil towards it... eventually ;)

However, I do not like the general holier-than-thou attitude that much of the community takes and the fact that they seem to spend more time talking about how fucking awesome Ruby is than they spend actually writing code.

This is exactly the position taken on both sides of religious language wars. Don't consider yourself above the fray unless you can get over these emotions.

Because it looks nothing like a standard for loop.

I'm reading: "Because [language feature in A] doesn't look like [language feature in B]." This argument is frequently made by Blub programmers. I can say that I find the first way more intuitive simply because it matches all the other kinds of iterator functions in Ruby. Will you accuse me of immature fanboyism?

There are stupid fanboys and uninformed wannabes in the young Ruby community. Try not to let them influence you as much as they are now. If you want to divide programmers up like that, then try to imagine someone similarly minded on the Ruby side. What they might see in you is a Python guy on a mission against Rubyists. There is plenty of room to interpret your comments as a manifestation of a "holier-than-thou" attitude.

I can come up with just as many silly reasons to hate Python with all of my heart and soul. There have been plenty of times when I have programmed in Python and have stumbled across something I can rant about. So what? I can go rant about it, and then someone will rant back at me, and pretty soon we're having an idiot contest.

Ruby and Python are both stupid, over-hyped, and totally awesome. Their communities are both full of morons, trolls, anti-{Ruby|Python}ists, and really smart and nice people.

I'm not saying that we shouldn't argue about languages. I like to argue about languages. I'm saying that "that doesn't look like a for-loop!" and "I hate Perlisms!" are vacuous, and I'm also saying that being anti-fanboy is no better than being a fanboy.

Think independently and make your own conclusions that are uninfluenced by all the people on the Internet that are wrong.

"Because [language feature in A] doesn't look like [language feature in B]."

Well, obviously. It's not like I'm arguing that Ruby's syntax is for The Gays because it differs from Python's. I find nothing fundamentally wrong with it, other than the fact that it is not intuitive to me, having seen hundreds of incantations of the for loop. An oft-touted "feature" of Ruby is that it is intuitive; I find it to not be intuitive. This is entirely my opinion.

In the end, a large portion of one's opinion of a language is based off of personal preference. There are undeniable, factual problems with Ruby in terms of performance, community maturity, complexity, language features, etc. There are even more opinion-based, subjective reasons why I feel it is a poor language choice. I make no attempts to justify these reasons beyond making it clear that they are merely my opinions. And I was quite clear on that.

If you can come up with as many silly reasons (some of my reasons aren't silly by any definition, but I digress) to hate Python, then go right ahead. I certainly don't care. I wasn't ranting about it to try to convince anybody of anything; why I like a language isn't important enough to make a soap box out of it. I was asked a question, I answered that question. That's all.

The biggest difference is that tdavis isn't a python zealot. Instead of talking about how awesome python is all the time, he's showing how awesome it is by coding with it.

He didn't force a rant to spark endless political-like debate. Someone politely asked his opinion, which is by definition filled with his own preferences & biases, and he politely gave it.

Not that I'm a big Ruby fan or anything, and I do agree with some of what you said, but... what does or doesn't look like a loop depends entirely upon what you're accustomed to. Pythons loop syntax isn't objectively better (I realize you said to you); however, don't think something else can't feel just as natural after a little experience with it.

There are advantages to the Ruby version as well, the Python version uses special syntax; a control structure one must memorize the semantics of. Semantics which are slightly different for different control structures in the language like knowing boolean expressions in if statements short circuit their evaluation, or the body of a loop is evaluated once for each iteration of the loop.

The Ruby version, copied from Smalltalk, is using a more general technique of building control structures in the library rather than as special syntax all built upon passing lambda/anonymous functions/blocks, whatever you like to call them, around to higher order functions like each. The benefit being you can see the delayed evaluation and build custom control structures in your own libraries without the need to memorize new semantics that aren't visible in the code as with procedural keyword control structures like if/when/do/while/switch, etc.

Admittedly, I think Ruby's version is a bit ugly, I'm a Smalltalker and find this much better...

    {'list'} do: [:food | food capitalized print ]
And to me that looks totally like a loop. Once you have a concise notation for lambdas like [ ] or [:arg | ] you find much less need for special keywords and tend to want all control structures in the library rather than the language.

Lispers feel the same about their macros. To a Ruby programmer, each screams loop just as loudly as for to you, or do to a Smalltalker.

From your explanation, I would then imagine that were I a long-time Smalltalk/Lisp user I would decry Python for its silly keywords.

As you noticed, I tried to make it obvious that some of my reasons were in no way objective.

I know you did, and I acknowledged that, I was just trying to point out to you that you have the ability to change those emotional reactions; they aren't set in stone or based on logic.

Very true, and if this were a case of me disliking a fundamentally better language due to foreign syntax I would change that. However, after doing a lot of reading and experimenting with Ruby, I can't really find anything fundamentally better about it.

There isn't, frankly I find it a very ad hoc messy language myself. I just wanted to point out that lambdas and higher order functions are one the cool things about it, even though they do it wrong and have 3 different ways to create blocks.

Smalltalk does it right, blocks are real objects and have only one syntax for creating them and don't require being passed as the last arg to use the sweet syntax.

As gnaritas pointed out, what you're running up against in that unfamiliar loop is a Smalltalk idiom that Ruby imported. My first reaction to this was, well, it's only unfamiliar, and what you call the "standard for loop" is merely a sample bias. On second thought, though, I think your original point stands. You can't just import idioms from wherever, put them all together, and shake. Or rather, you can, but what you end up with is "far more ad hoc than elegant".

What Smalltalk has that Ruby doesn't have is a simple, regular structure at its core that everything else is defined in terms of. Although it may not seem like it, that's far more than an academic point. It has enormous consequences for the programs you can write - for the programs you can think of. Most of the computing world has yet to catch up with this insight.

In the meantime, we get kitchen-sink languages that are good enough for the classes of programs that we already know how to write and are looking to make incrementally easier. I'm tempted to compare Ruby to PL/I. But that's unfair since Ruby at least was invented by a programmer who wanted to make a language he would enjoy.

  Sometimes you need (), sometimes you don't. Some people 
  think the lack of "unnecessary" parenthesis makes the 
  language more elegant, I just say it makes it harder to 
  determine if something is an attribute or a method, for 
  example.
Well, this is because Ruby, like Objective-C, is a strict OOP language, and there's no such thing as an "attribute" (all instance variables are private). When something looks like an attribute, it's a reader method that returns the attribute.

Very well written constructive criticism. You have brilliantly summarized the issues with ruby (and its community).

And i really liked the point about the language being not intuitive for everyone. Not many say it as it goes against the core 'cool' feature of ruby, but it's far more easier to crank up a good amount of messy code with this language, if one is not careful enough.

The 'for i in list' syntax exists in Ruby if you want to just loop over a list. The block syntax though gives you the flexibility to use map/collect, select, reject, or inject instead of plain each over the list to give you some functional advantages.

Exactly. It's not that Ruby lacks the ability to do some things, but rather, has its own additional idiomatic way of accomplishing the same task.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.