Questions tagged «monkey-patch»

5
Monkeypatching是否被视为良好的编程习惯?
我一直在印象中,monkeypatching属于快速和肮脏的hack类别,而不是标准的良好编程习惯。虽然我不时使用修复第三方库的小问题,但我认为这是临时性的修复,因此我会向第三方项目提交适当的补丁程序。 但是,我已经将该技术用作主流项目中的“常规方法”,例如在Gevent的gevent.monkey模块中。 Monkeypatching是否已成为主流,正常且可接受的编程实践? 另请参阅:杰夫·阿特伍德(Jeff Atwood)的“ Monkeypatching for Humans”
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.