or PettyLittleRubyComplaints ...just following the WhyWeHate pattern.
Nobody really hates RubyLanguage...right? ...but only a close relationship exits as this reaction indicated.
Why does Ruby include some sugar to make your beautiful Ruby code look half Perl? Does Matz actually use these things or does he use the more pure Ruby alternatives? Is it to attract PerlLanguage programmers? Does this work? Was Ruby more accessible to me because of this?
Because a prime Ruby directive is "easiest for the programmer". Adopting ONLY "if str ~= /foo (bar)/ then $1" from Perl avoids crud like Python's horrific re.search() method, which you can't even put into an if!
Sure you can- re.search returns a True value (MatchObject?) on a match, and a False value (None) on no match. Unless you mean you want store the match, too, in which case that doesn't belong in an if condition anyway
Parentheses are usually not necessary around method arguments. But sometimes they are. Just like Perl. Arg.
Also, Ruby's stack depth is exceeded far sooner than Python's.
Which is impressive.
"Documentation" is scattered all over the internet.
I have to refer to Zen Spider's Ruby QuickRef to find the built-in Exception hierarchy, the online PickAxeBook to read how to open a file, the RubyGarden wiki to learn about RubyCoerce, etc., etc., etc.
Core and Standard API docs are incomplete, misleading, or wrong.
The File class "is closely associated with class IO," yet the docs fail to say that File is a subclass of IO.
Most Set methods return fresh Sets, yet the docs claim they return Arrays.
RDoc-generated documentation sucks
The gray backgrounds are too dark. Spotting a method name against medium gray is difficult.
Each unit in the Standard Library has its own CascadingStyleSheets file, making it nigh unto impossible to change style across the board, especially if you want to update your library.
What's with the PragmaticProgrammer publisher appearing overnight and monopolizing the publication of Ruby books?
I call BS. Pragmatic published a couple first, because 1) no one else wanted to at that time, and 2) they have a very short pipeline. "Monopolizing" would have been if they'd prevented other people from doing the same, which they haven't. They were just "first with the most".
Suppose you define a Vector class and you define its '*' operator for 'vector * number'. That's fine, but good luck defining the same for 'number * vector'. Good luck making your multiplication commutative.
You can do this, it is called RubyCoerce and there are links there which explain it. I have used it to enable addition of numbers to user defined objects, including interfaced code written in CeePlusPlus. -- JohnFletcher
Yup. But the rdocs are not helpful, and this is not in the online Pickaxe. As usual, Ruby documentation is exasperating and how to do this in PythonLanguage is so much more obvious. Plus, there's more to this saga... -- ElizabethWiethoff
The Ruby community has a big problem with NIH (NotInventedHere) and a superiority complex.
Rather than use common method names from other runtimes, it goes out of it's way to pick new and less intuitive names
e.g. String.toLowerCase() becomes String.downcase()
Horrible suffix characters that you thought you'd got rid of when you ditched BASIC
And some of them make for methods that differ based only on the suffix
e.g. String.chop vs String.chop! - where the latter does damage to the instance because Ruby has MutableStrings
excited.weenies.every do |weenie|
But they still haven't got rid of the pipes. If they really wanted Englishification:
excited.weenies.every do with weenie
// examples damaged by TabMunging
The only common superclass of True and False is Object.