Wednesday, March 01, 2006

Duck typing

I've been meaning to post about Duck typing in programming languages such as Smalltalk. The term is intended to convey the idea that an object's type is defined by its method signatures rather than by its static type (e.g. if it walks like a duck, and quacks like a duck, then it might as well be a duck). This is standard behavior in late-bound languages like Smalltalk but with some clever usage of Dynamic Proxies, it's possible to do implement duck typing in languages like Java as well.

Note: I was reminded of Duck typing while reading Dave Herman's funny post on Nancy typing.

And going off on another tangent... Speaking of Nancy, I didn't realize that daily Nancy Comic strips are still being churned out.

I guess I shouldn't be too surprised. There are quite a few comics that have been around for 30 years or more. The comic page is intended as quick, untroubled reading.