Re:Ruby's Exceptional Creatures
by pantulis on Monday January 29, 2024 @03:11AM
(#39173949)
Do you mean the class << self pattern?
[ Parent
| on HN ]
Re:Ruby's Exceptional Creatures
by matheusmoreira on Monday January 29, 2024 @03:18AM
(#39173991)
That's what I thought as well. If someone's opening metaclasses to define singleton methods they probably know all about the Ruby object model. I don't see how it could be done "without knowing you're doing so".
The people who did it first did understand the meta model.
Unfortunately some people started following without full understanding. I wasn't at forefront of things back then, so I only noticed when the people who did know better started to writing about abuse of this technique.