3 ms·
method_missing is a tiny offense compared to what was getting popular at one point - creating classes by forking metaclass and injecting methods into... without
by p_l 3y ago
method_missing is a tiny offense compared to what was getting popular at one point - creating classes by forking metaclass and injecting methods into... without knowing you're doing so (something IIRC got lost between people there...)
Result was objects that shared no structure, no field
- pantulis 3y agoDo you mean the class << self pattern?
- matheusmoreira 3y agoThat'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".
- p_l 3y agoThe 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.
- deleted 3y ago[deleted]