4 ms·
This means that your objects are aware of every "container" that might hold them. This does not scale, and it certainly doesn't work for reusing data structures
by quatrevingts 14y ago
This means that your objects are aware of every "container" that might hold them. This does not scale, and it certainly doesn't work for reusing data structures.
- Evbn 14y agoIt scales in the sense that all types are extensible: you can make A implement B by adding the appropriate definitions anywhere, not just in the file that defines B. Rubyists call this monkey patching and they love it (but Ruby monkey patching can do wackier things beyond adding new methods)
- quatrevingts 14y agoBut I can only make A implement B in the file that defines A, at least according to the comments here: https://news.ycombinator.com/item?id=5443344 https://news.ycombinator.com/item?id=5443344