We are a software consultancy based in Berlin, Germany. We deliver
high quality web apps in short timespans.

Upstream Agile GmbH

Mnemonic for Duck Typing.

August 26, 2007 by thilo

I’m currently reading 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"