Let the IDE do it

On Bruce Eckel's Static vs. Dynamic [typing]:

This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2005/02/let-the-ide-do-it.html

I’m hoping to see an IDE that will detect and highlight, as you type, not only syntax errors, but also - thanks to TDD and a hoped-for language with integrated testing - semantic errors, as defined by the tests. I think it’s easily possible; my initial foray is on sourceforge:

I think the IDE has to take a more primary role in language development. There is no other way to resolve the static vs. dynamic conundrum.

As Bruce points out, even the strictest of strictly typed language compiler can’t guarantee we unit tested anything. Code that compiles is code that probably has bugs anyway. And the static typing can actually get in the way! So it’s kind of a wash-- what does it get you?

But if the IDE could do (ignorable) static type checking, I think that’d be a perfect middle ground.

Sorry, I know this is an old old post, but I’m archive diving right now.

There’s a clear third solution here. Use a language that is dynamic by default, but allows you to statically declare types when you want. This way you get all the flexibility needed for exploratory programming, while allowing you to ‘lock down’ your code later. And you get better hooks for the compiler to optimize around for free!

I’ll point out that some languages (Lisp, frex) already do this.