23 October 2006

Strong Typing vs. Strong Testing

[Blog on Blog]

... without a full set of unit tests (at the very least), you can't guarantee the correctness of a program. To claim that the strong, static type checking constraints in C++, Java, or C# will prevent you from writing broken programs is clearly an illusion (you know this from personal experience). In fact, what we need is

Strong testing, not strong typing.

points to note:

  1. A very concise code sample comparing strong type and weak type language, where weak type loose the semantic on checking variable type – it works as long as it implements the method expected.
  2. unit test is an extension to complier