5 ms·
I used to work with smalltalk. There was a TON of added methods on the class Object and others. When I said something about it I was told this is OOP :)
by dominicrose 2y ago
I used to work with smalltalk. There was a TON of added methods on the class Object and others. When I said something about it I was told this is OOP :)
- vidarh 2y agoWith refinements, there is now little excuse to do that globally in Ruby any more. Refinements let you "temporarily" modify a class within a lexical scope. E.g I have an experimental parser generator that heavily monkeypatches core classes, but only when lexically inside the grammar definition. It lets you have the upsides of the footguns, but keeping them tightly controlled.
- igouy 2y agoI used to work with Smalltalk. There was a TON of added methods on the class Object and others. (A hidden array on every object because ...?) When I said something about it I was told OK let's get rid of them. So we stripped out the "clever stuff" back to as-provided-by-the-vendor :)