public marks

PUBLIC MARKS from mbertier with tags clevermarks & rails

26 February 2008 10:30

Virtuous Code › Monkeypatching is Destroying Ruby

(via)
Hooks are just one of the techniques available to us for robustly handling extension in a language as dynamic and powerful as Ruby. Another is using the dependency injection style1 to decouple classes from each other and allow third parties to substitute their own classes without monkey patching. Another un-sexy but important practice is simply writing clear and comprehensive documentation of our classes’ APIs and extension points.