Jon Allured

Computer Programmer, Whiskey Drinker, Comic Book Reader

Cheek and Grimm on Modules

published 02/17/12

Josh Cheek shares some thoughts he's had about Module inclusion and challenges some of the standard Ruby practices around them. Cheek seems to be unhappy that its idiomatic Ruby to include a Module only because you want to get the included callback. He would rather see us writing methods that add this behavior explicitly. He provides some examples of alternatives to the typical way one might use a Module and they seemed interesting.

Then Avdi Grimm responds in a post of his own where he agrees with some of Cheek's ideas and not with others. Grimm has this idea of being able to compose with ActiveRecord rather than having it pollute the public methods and the pseudo code is worth a read.