Thursday, November 20, 2008

Strong types, weakly bound

Reading Strong opinions, somewhat weakly held on Jason Cohen's excellent A Smart Bear blog this morning, I was quoting this excellent soundbite (you really need to simplify it down to "strong opinions, weakly held" to make it work as a soundbite) out loud to Anna and musing about it -- and exactly at the same time she and I chorused about the analogy this has with Python's approach to typing... objects with strong, precise types, but "weakly held" (i.e., weakly bound) via names or slots in containers that might just as well hold objects of other (also strong) types.

This analogy may actually be the least "obvious" thing she and I found ourselves "chorusing" about, though such "choruses" happen more and more often and so it's becoming hard to tell;-). Anyway, I'll be sure to use this next time I need to present Python's typing approach -- now if I can only find a way to work ducks into it, too...


Anna Martelli Ravenscroft said...

Wow - you must love that blog. You didn't even comment on the "tenant"/'tenet' conflation.

Jason Cohen said...

Ouch, thanks Anna! I've corrected it on the website, although of course the RSS feed, like an elephant, will never forget.

Typos were even more embarrassing in my book -- a book supposedly about peer review. :-)