3 ms·
I always used the word "magic" to describe Ruby syntax. It was my biggest complaint with it too. RoR took that even further by adding even more magic through a
by jacurtis 3y ago
I always used the word "magic" to describe Ruby syntax. It was my biggest complaint with it too. RoR took that even further by adding even more magic through a framework, where simple functions did HUGE amounts of hidden work.
I will say, my favorite feature of Ruby was the question mark in methods convention.
For those that don't know, a common convention in Ruby was to put a question mark at the end of any method that returns a boolean.
So for example you could write:
if product.active?
... DO THIS THING
It was fun and I enjoyed it. Behind the scenes it was just a method, but the question mark at the end was always fun to me from a readability standpoint.
However, its really not all that different than the pythonic way:
if product.is_active():
... DO THIS THING
Something about the question mark felt fun and magical.
- kuchenbecker 3y agoIt's the "just works" part of magic that's the gotcha. I lead a team with a multi EiB Hadoop cluster and magically list status and rename dir can only be done with more and more caveats as you scale.