But I know people who love it, as you seem to, which is great...but not a universal sentiment.
Also the "last statement evaluated is what's returned" behavior leads to super not obvious data flows sometimes which is similarly frustrating.
A lot of ruby's philosophy seems rooted around doing away with what looks like redundant code at a severe cost to readability / adding significant cognitive load, in the name of "elegance," and that drives a LOT of my frustrations with my org's ruby codebase.
If you see ! on a method it means one of two things:
1. The method modifies the object in place in and may return nil if no change is made. This is what the Ruby standard library does.
2. The method throws an exception when there’s an error. Usually there’s a non-! version that returns nil or false instead. Rails made this a popular option.
Ruby likes to provide everything so there are methods that return new objects and there are methods that modify objects in place.
And there are a lot of methods to do almost everything you can think. Which tends to make Ruby code more compact.
But you have to keep the documentation handy until you’ve learned them because the method names are odd. The designer of the language it’s not a native English speaker.
The if keyword returning a value takes some getting used to.
You never see a for loop because you pass code blocks to iteration methods. This kind of thing is all over the language.
You don’t need parentheses on method calls, which means you need to know if you’re dealing with a local variable or an instance method.
Another thing is Ruby allows code to be far more compact. Doing the same thing in python may require two to ten times the amount of lines. But if you can’t read Ruby code quickly and follow what happening, any advantage compactness might have becomes an exercise in frustration.
All in all Ruby a bit of an odd language. I personally find it an absolute joy to work with, but a lot of people very justifiably do not have the same opinion. :)
> Another thing is Ruby allows code to be far more compact
Yes, this I've definitely noticed, and I do really like. The block syntax and proliferation of functional-style stuff is an absolute joy... most of the time. It fits the style of how I like to think about problems, and lets me move very quickly for writing code, but I often find myself confused about what existing code does, and it takes me a while to load the context into my mind when I'm working on something.
I think that's because while other languages (like Python) tend to be more verbose, that verbosity leaves room to explain what's going on more clearly. I'm not saying verbosity is always a good thing--I've written enough Java to know that, but I do sometimes find myself wishing there were more 'clues' in the ruby code I deal with to help understand what's going on.
Not needing parenthesis and general strangeness around value returning doesn't help, either. Again, I see how it makes code more compact, and that can be a good thing (fitting more relevant code on the screen at the same time), but inasmuch as understanding what's going on quickly, sometimes I wish there were a few more markers :)