5 ms·
My perspective as detailed in the full message is that the sense in which meta-programming in Ruby is magic is more akin metaphorically to prestidigitation than
by a4isms 5y ago
My perspective as detailed in the full message is that the sense in which meta-programming in Ruby is magic is more akin metaphorically to prestidigitation than to the supernatural.
In that sense, it does not imply "stop asking questions," nor does it imply "there is no answer." To me, it implies, "This may look like a supernatural entity is involved, but that's just a trick we're pulling. If we pull back the curtain, we'll find there's a little man with some levers and we'll see how it's done."
- nixpulvis 5y agoWhy pull tricks at all? Ruby is about being nice, not tricking us. Tricks are fundamentally shocking and uncomfortable at first. Many people like this from time to time, but it shouldn't be the intent of our programs. The programs should be written in a way that helps the reader learn. If that involves some clever reveals and abstraction / hiding then so be it. The best lessons are taught in stages.
- a4isms 5y agoThat's how Ruby meta-programming works, just as that's how inheritance works, just as that's how function calls work. They're mystifying at first, then you learn how to use them without looking under the hood, then you learn exactly how they work, then you start making your own. The word "trick" is associated with prestidigitation. Unless you're entering the Underhanded C context, these "tricks" are more like magicians showing EACH OTHER how to do things. "Here's how to make flowers appear out of your top hat." "Ah!"