Skip to content.

Manageability

Sections
Personal tools
You are here: Home » blog » archive » Static Typing, Test Driven Development and Eclipse
Views
  • State: published

Static Typing, Test Driven Development and Eclipse

Document Actions
20030508194415

With all this debate going about Static vs Dynamic typing, I decided to "consult" an expert.  Eric Allen, a Ph.D. candidate and a researcher of static typing,  writes in "The Case for Static Types"  several reasons why static typing makes code more robust:

  • Improves robustness through early error detection
  • Increases performance by making required checks at the best times
  • Supplements the weaknesses of unit testing
  • However, he points out a conflict with type checking and unit testing.

    But there's a problem here: the new tests won't pass static type checking until we have defined the classes and methods to which the tests refer. These classes and methods can be stubs that we fill in later, but unless we have something in place, the references to them in the tests won't make sense to the static checker.

    The article is almost a year old, and its most likely that he didn't have the opportunity of building his tests in the Eclipse environment.   To show you how much easier it has now become, I've composed a viewlet that demonstrates Test Driven Development (TDD).  You can watch it here (it's hosted by Ammai.com).

    I think given the arguments presented by Eric Allen, and the utility of Eclipse in doing TDD, the issue of Static vs Dynamic typing should be a closed issue.


    Last modified 2004-08-08 06:55 PM
    visitors
    reading
     
     

    Powered by Plone

    This site conforms to the following standards: