All I want is a little type inference

Apart from R, I do most of my research programming in Java. There are two major reasons for this:

  1. The Stanford NLP lab group I was in during grad school programmed in Java, and old habits die hard.
  2. Java has some very nice IDEs — IntelliJ and Eclipse.

One thing that bugs me a lot about Java, though, is all the type casting that you need to do. I got very excited when Java 5 introduced generics, and I use them so much that I need few casts in my programs. But then I got exposed to Ocaml and type inference. What a language! What a feature! It is the closest thing I’ve ever seen to being able to say that if your program will compile, then it will work properly.

With the right IDE available, I would give up Java and adopt Ocaml right now — (1) above I can deal with, but (2) is hard to leave behind. Sadly, no language with type inference seems to have a functioning IDE with the same power of IntelliJ or Eclipse. Anyone out there reading this blog who feels inspired, go and work on Eclipse integration for Ocaml! Here is the list of critical IDE features I’d want, in order of importance:

  1. Safe rename
  2. Safe move
  3. Auto extraction of functions/expressions
  4. Quick navigating to types (or functions, modules, etc. in Ocaml)
  5. Outline views
  6. Integration with debugger/output (e.g., cross-referencing of error messages to code lines across windows)
  7. Auto-generation of code—we’d need a lot less of this in Ocaml or the like.

The best prospect right now may be ODT

Post a Comment

You must be logged in to post a comment.