6 ms·
On the other hand, when you do have categories in a language and not the smartest people in the language's community, you do have real problems: You end up wit
by thoran 11y ago
On the other hand, when you do have categories in a language and not the smartest people in the language's community, you do have real problems: You end up with conflicting definitions of homonymic methods because every one wants his own "toJson" crap. And everyone tries to monkey patch every other components. Ruby is plagued by this disease.
Haxe and Scala (and probably many others) have a nice solution to this problem. You can add "methods" to existing classes but only you can see them. You never really change the semantic of something that does not belong to you.
- jmgao 11y agoRuby is hilarious because importing a library in the standard library (or importing a library that uses it) can break division: https://bugs.ruby-lang.org/issues/2121 https://bugs.ruby-lang.org/issues/2121