Wednesday, April 30th, 2008

JavaScript Type Inference in IDEs

Category: JavaScript, Utility

<>p>Tor Norbye has posted about the type inference that NetBeans has with JavaScript:

Roman Strobl has just published a screencast of the new JavaScript editor in NetBeans 6.1. The demo is around 5 minutes and highlights many of the editing features.

I’d like to dwell on the type inference part a bit. Around four minutes into the demo, Roman shows that NetBeans figures out the types of expressions, including those involving function calls. In his example, all the types happened to be Strings so it may look like a lucky coincidence. It’s not! Here’s some code fragments showing in more detail what’s going on.

He goes on to walk step by step through the completion points discussing how the IDE can get the information that it does.

It is great to see this great support for dynamic languages, as we are accustomed too on the static side.

Netbeans Type Inference

Related Content:

Posted by Dion Almaer at 6:57 am
2 Comments

++++-
4.1 rating from 19 votes

2 Comments »

Comments feed TrackBack URI

That looks nice but I’ve already had all these features with the JSEclipse plugin for Eclipse which I love so much because it supports pretty much any language you can find an extension for.

Comment by rsumi — April 30, 2008

Regarding the first comment: the same could be said for Komodo as well (except it comes with the standard package).

Comment by Unfocused — April 30, 2008

Leave a comment

You must be logged in to post a comment.