From: Avdi Grimm Date: 2008-02-25T22:30:51+09:00 Subject: Re: Monkeypatching is Destroying Ruby On Mon, Feb 25, 2008 at 12:33 AM, Marc Heiler wrote: > Why is it dangerous? One of the reasons concepts like modules and classes were introduced to programming languages was to reduce accidental collisions. Monkey patching discards all of that. In a sufficiently large project where monkey patching isn't vigorously discouraged, unexpected and extremely difficult to debug interactions are almost inevitable, because monkey patches by different authors (or by the same author at different times) interact or collide in unpredictable ways. Where this becomes a community problem and not just a team problem is when authors of gems and plugins start to see monkey patching as "the" way to write extensions in Ruby. Thus making such unpredictable interactions practically unavoidable if you want to re-use anyone else's code. -- Avdi