Dynamic Languages vs Editors

by Phlip

A proposal to help editors work better with dynamic languages — by not pretending they are static, and by leveraging their unit tests.

As a Test Driven Developer, using dynamic languages, editors frequently disappoint me. The main thrust of editor research, for the past few decades, targets debugging static languages. This post suggests a very simple fix.


2008-05-20 02:26:04
No matter what file you are looking at (even one in a different language!), the test button should save all changed files, then run a registered batch of tests. It should leave your editor available and focused, and should provide the option to navigate to any errors.

I've been working with some code to start integrating these features in vim. First, I use some vim functions to tell me which tests cover which code (and this in turn in based on a "work in progress"). I already have test mappings to automatically run tests, but the test framework we use has limitations in presenting filenames and linenumbers in synch with the appropriate tests (how embarrassing, eh?). We're working on this, though.

I never thought about your type library, though. That sounds like a wonderful idea. It will solve many problems, though there's the caveat that with dynamic languages, types are a highly variable (hah!) concept.