| >Rightward assignment statement is added.
>fib(10) => x This is exactly the kind of stuff I hated when I had to work with ruby in my last gig and why I will never accept a job using it again - soo many pointless and inconsistent ways to do the same thing ... they have method aliases for collection operations like map/filter in standard library ! .NET went with non-standard SQL-like names (select/where) and I'm not a fan but at least they made their choice and stuck with it. And it's inconsistent all over the place - like '!' postfix means "operation mutates the object" in std lib BUT in rails it means the operation will raise an exception and not return an error code. Now they add a pointless operator that means completely different thing in other languages to throw off even more people. It's just a hell of a language to maintain someone else's code in. |
I've done Ruby since 2014 or so at a few shops. My general anecdotal experience:
- Lone Ruby coders often use a lot of that cutesy/obscure/dense stuff.
- Teams of people writing Ruby, with healthy code review practices, tend to value simple, easy-to-read Ruby.
- A lot of Popular Ruby gems (and projects at aforementioned Ruby shops) have Rubocop-based style guides. Rubocop has some very strict ideas about Ruby coding style. The defaults are mostly quite sane and it's easy to disable/customize the ones you disagree with.
Not making excuses for some of the more florid parts of Ruby's syntax and stdlib, but in practice I do find things are manageable!