Why Ruby Scares Me

Ruby scares me. It’s not the language that strikes fear in my heart, however; it is the community.

The Reasons

  1. They treat Ruby as the Messiah — there is nothing better. There is nothing else. Only Ruby.
  2. Community Leader Idol Wordship — did anyone catch the (online presence) death of _why?
  3. “Now we can finally get things done”. — See next question.
  4. Have you ever seen Ruby code? Look at below.
  5. See Reason # 4.
1
2
3
4
5
6
7
8
def remember(&a_block)
  @block = a_block
end
 
remember {|name| puts "Hello, #{name}!"}
 
@block.call("Jon")
# => "Hello, Jon!"

Can you really tell me, with a degree of certainty, what that’s supposed to do?

Please, just shoot me now.

2 Comments

10 FEEDBACKS

  1. [...] the original post: Why Ruby Scares Me // Kenneth Reitz By admin | category: ruby | tags: community-leader, get-things, leader, messiah, [...]

  2. The language itself strikes fear in my heart too after your example.

    Ruby: Fearsome!

  3. Daan says:

    I've never programmed in Ruby, but I guess this would be a somewhat accurate Python translation:

    import sys

    def remember(ablock):
    global block
    block = a
    block

    remember(lambda name: sys.stdout.write(“Hello %s!n” % name))

    block(“Jon”)
    # => “Hello, Jon!”

  4. Ridiculous commentary. People always are scared of the unknown, which is why we should always strive for understanding. This article is just pure, simple and disgusting FUD, meaning that the guy is lazy enough to study but wants to justify his laziness seeking for approval on his ignorance. ’nuff said.

    This comment was originally posted on FriendFeed

  5. Social comments and analytics for this post…

    This post was mentioned on Twitter by planetpython: Kenneth Reitz: Why Ruby Scares Me http://bit.ly/4yBCXW...

  6. Steven says:

    Your post is not constructive. My rebuttal isn't either:

    1. Kettle, meet Pot. Can't we all just agree PHP sucks?
    2. Vaguely. Maybe we can ask the Benevolent Dictator or Larry Wall for details.
    3-5. It's pretty straight forward. Since someone already pointed out you can do it in Python, here it is in perl:

    sub remember {
    $block = shift;
    }

    remember(sub {print “Hello, $[0]!” });

    $block->(“Jon”);

    Here it is in Lua:

    function remember (a
    block)
    block = a_block
    end

    remember(function (name) print(string.format(“Hello, %s!”, name)) end)

    block(“Jon”)

    And PHP:

    google, copy + paste

  7. still_rgz says:

    I have to agree with Steven, the example is ugly because it's contrived, a problem requiring such functionality would look intuitive.

    Although I agree that there's a lot of noise here. Example, it is not obvious from the example that you are editing the root Object, IANAR but doesn't this mean that every (new?) object now has a remember method and –potentially– a @block attribute. It's definitively not intuitive that @block exists because it was binded to a globally implicit self object, the lambda expression is ugly but Python's is worse anyway. the block parameter syntax is fine, it's just a shame that it can't take multiple blocks like SmallTalk's. @block.call is stupid, no true functions or functors is sad.

  8. Amen… Although to be fair, there is some pretty decent looking Ruby code out there too.

  9. [...] Shared Kenneth Reitz: Why Ruby Scares Me. [...]

LEAVE A COMMENT

Additional comments powered by BackType