Improving IDE support for dynamic languages like Groovy by taking a "Word" like approach?
I love how much more I can do with so little code in Groovy, but from time to time I miss the instant IDE feedback I got with a strongly typed langauge like Java. This argument is often made against Groovy , and the response is always that you should unit test your code anyway. Don't get me wrong, I'm absolutely all in favor of unit testing, but the time it takes from I make a simple spelling mistake until one of mye unit tests catches it annoys me.
Wouldn't it be nice if IDEs could detect really obvious spelling mistakes?
All the dynamic-voodoo-meta-magic going on behind the scenes in languages like Groovy makes it hard to implement IDEs with really good auto completion and error detection, but there are some really obvious errors that I think IDEs should be able to catch just by taking a simple "Word" like approach. I've made a simple mockup using NetBeans to illustrate my point:
Say that I've typed 'relatdArticles', it can't be found in any fields, parameters or local declarations, but there is a local variable declaration that's almost identical. It would be so nice if the IDE could give me a little hint that I might have a typo in my code. Perhaps something for Spring STS ?
The cost of testing in Grails
Peter Ledbrook was just appointed "Groovy & Grails evangelist" for VMWare (cool title and a really good choice!). He has written a good blog entry with the already mentioned argument that you should unit test your code no matter what language you're using, and that in doing so you'll catch most of the bugs caused by spelling mistakes.
His arguments are absolutely valid, but with Grails the cost of just running a single unit test is quite high. Just bringing up the first unit test takes somewhere between 12 and 15 seconds on my 2.5GHz quad core machine! To be absolutely clear, I don't want to get out of writing unit tests, but I want as early error detection as possible!
What do you think?
I really don't know anything about programming of IDEs, but this feels a little like a "low hanging fruit" to me.


noah - 23. Apr 2010 15:59
Eclipse and IntelliJ do this. They underline anything that can't be statically resolved.