Bill Venner's asks...
Do you think type inference will change the dynamics of the static versus dynamic typing debate?For some people, yes. But not (yet?) for me.
I do not see dynamic languages as only "saving key strokes". Dynamic languages for me also save the cycle time from a small idea to its incarnation as running code.
The languages like Scala and Haskell that I have tried, to the extent I have tried them, do save me key strokes. I have not crossed over the hurdle to where they save me cycle time to running code, for a few reasons:
- Running small snippets of code, especially code that I have changed out of a larger body, is easier for me in dynamic languages. Those type inferencers still want to infer everything and seem to have low tolerance for incomplete thoughts.
- Scenarios that are fairly easy for me to envision in a dynamic language, functional or imperative, tend to involve various type theories that I know little about. The literature is still not very good for programmers new to the modern type inferencing languages and modern type theory. My sense is picking this up by pairing with someone already imbued with "type-first" programming would be fairly easy, much easier than picking it up solo with the available beginner's books and web resources.
- Test-first programming has been done for a long time in dynamic language cultures. This pre-dates Kent Beck's Smalltalk sunit library by a couple of decades. The Lisp read-eval-print loop and the Smalltalk workspace have been the instruments for hypothesizing how some code should work, and then working it for a long time. xunit tools, Fit, etc. are somewhat more formal frameworks for the dynamic way or programming - writing a bit of code with a test, capturing the transcript, and repeating that every so often. Good testing is necessary to be successful with any programming language, and I can go fairly quickly with a simple language that stays out of my way, and a reasonable test framework for capturing and repeating many small theories of how the code should work.
If anything I predict the current static inferencing tools to drive more programmers to dynamic languages *because* they want the simplicity of better languages than the Java-like ones but they suffer too much from type inferencing and various type theories for languages like Scala and Haskell.