r/ruby • • Sep 22 '11

The Top 10 Reasons The Ruby Programming Language Sucks

http://www.slideshare.net/vishnu/the-top-10-reasons-the-ruby-programming-language-sucks
0 Upvotes

11 comments sorted by

6

u/Amadan Sep 22 '11

Things I hated that caught my eye:

  • "Hello World" comparison with other languages - if you're going to compare, do it properly.

  • Everything's an object - even code blocks. Beep - false. Code blocks are not objects, but can be wrapped into objects by lambda or Proc.

  • Serve Servlets?!? Maybe JRuby...

1

u/roger1981 Sep 23 '11

| Code blocks are not objects, but can be wrapped into objects by lambda or Proc

Are you sure about that? If I pass a block to a method, that method can store the block for later execution.

2

u/Amadan Sep 23 '11

AFAIK, no. When you capture a block, it is converted into a Proc object. Thus, in def(&block), &block will wrap the block into a Proc (i.e. block.class will evaluate to Proc). But block itself is not a Proc - blocks don't accept methods (you can't say something like { puts "test" }.repeat(3)), and creating a Proc is much slower than creating a block (the difference being the time spent wrapping the block into a Proc object).

This blog post gives a good account of it - in particular try the benchmark test for yourself if not convinced (the code snippet under "The difference - implicit invocation is much faster").

1

u/[deleted] Sep 22 '11

Exactly, I'm a Java Dev and used Rails for 2 of my side projects. And I think that there are heaps of stuff that Java can borrow from Ruby.

3

u/weavejester Sep 22 '11

I was hoping that this would be a legitimate discussion of Ruby's weaknesses, with perhaps suggestions on how to fix them. :-/

1

u/roger1981 Sep 23 '11 edited Sep 23 '11

Why not start it ?

I agree with the documentation part. I still have only the ruby 1.8.6 documentation downloaded whereas I've been using 1.9 for ages. Maybe there's a downloadable doc for 1.9 now. (Ok, i stand corrected. They've finally released docs for 1.9.2!)

One thing I remember that bit me badly coming from Java (in brief) was the mutable string. I had sort of expected a "copy on write". I was told to dup() the strings on returning it, which I think is expensive.

2

u/roger1981 Sep 22 '11

I am wondering why people down-voted the link. It's a bit old, but still very relevant. (I am a ruby developer btw).

3

u/[deleted] Sep 22 '11

It's a neat introduction to Ruby. Haters gonna hate, etc etc. I feel like this slideshow is past its time, but maybe I'm just too immersed in the Ruby community to realize what non-Rubyists think of Ruby.

-5

u/Stick Sep 22 '11

3

u/JohnaldTheRobot Sep 22 '11

I'm guessing you didn't read it. Funnily enough this slideshow debunks the "reasons" as to why ruby is bad.

I bet you also though http://najafali.com/php-is-better-than-ruby.html was a serious article.

1

u/Stick Sep 22 '11

I read it and upvoted it actually.