|
|
|
|
|
by t43562
230 days ago
|
|
I do think some module writers get overexcited about using some dynamic features and it can be hard to understand what's going on. On the other hand.... Dynamic languages let you do a lot of things with meta classes and monkey-patching that allow you to use a library without needing to build your own special version of it. With some C or C++ library that did something bad (like the logging one you mentioned) there's nothing for it but to rebuild it. With Python you may well be able to monkey patch it and live to fight another day. It is great when you're dealing with 3rd party things that you either don't have the source code for or where you cannot get them to accept a patch. |
|
Now of course, we should have long removed the monkey-patch, or properly documented it somewhere, or I should have been more knowledgeable about Ruby and known that monkey-patching was a thing, but there's a reason why it is a pretty frowned upon practice.