Posts Tagged ‘mnemonic’

Mnemonic for Duck Typing.

Sunday, August 26th, 2007 by Thilo Utke

I’m currently read the Ruby Cookbook and found a good explanation for duck typing. You know, the concept to treat objects according to their methods rather their classes/modules. It might be well known to you, but i like to share it anyway.

Duck Typing means:

“… if an object quaks like a duck, just go ahead and treat it like a duck”