An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Static vs Dynamic (Part 94)

October 20, 2006 · 1 Comment

The (frighteningly) prolific Peter Bell continues to blog about the pros and cons of static typing compared to dynamic typing. What's interesting about these two posts is that Peter is referring to writings by Bruce Eckel and Robert Martin - two programming giants famous for their work and writings about statically typed languages who are both advocating dynamically typed languages and unit testing. The key issue here is unit testing because, as both of these authors point out, you need to write good unit tests regardless of whether you are programming in a statically typed language or a dynamic one. They found that the more they relied on unit testing, the less they relied on the compiler to do type checking and the more they were able to take advantage of the productivity that comes with a dynamically typed language. Eckel's direct comparison of Java and Python is very telling (because it shows how redundant interfaces - or "marker" base classes - are in a dynamic language). I'd read quite a bit of Eckel's writings on this subject (he and I both spent eight years on the C++ Standards Committee) but had never seen Martin's article so thanks for highlighting those Peter!

Tags: coldfusion

1 response so far ↓

  • 1 Peter Bell // Oct 20, 2006 at 1:07 PM

    Hi Sean,

    np! BTW, does ANYONE have any leads or thoughts on code coverage tools for TDD in CF? Even with unit tests for every cfc there still isn't a guarantee that you'll exercise every path within complex methods (I know, you shouldn't have complex methods, but sometimes life happens!). I like the idea of relying on unit tests, but would love to see some kind of tool to support that. Any ideas on where to start?

Leave a Comment

Leave this field empty: