September 18, 2009
Poll Result: Java Is Most Preeminent in Europe.
Some voters in this past week's java.net poll questioned whether the question could be answered, but the result showed that a plurality of voters considered Europe to be region where Java has the greatest market share among competing technologi...
More »
September 17, 2009
Sun Collaborates with Software Freedom International to Connect More than 25,000 Developers and Students in 30 Countries for Software Freedom Day 2009. Building on its commitment to empower developers and students across the globe, Sun Microsystems, Inc. (NASDAQ: JAVA) is sponsoring more than 300 community style events in more than 30 countries for Software Freedom Day (SFD) on September 19, 2009. W...
More »
November/2009
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 8 | 9 | 10 | 11 | 12 | 13 | 14 | | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 | | 29 | 30 | | | | | |
|
 |
JavaScript Type Inference in NetBeans
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. Let's start with a jQuery expression in an HTML file - in my
last entry
I showed how code completion already
helps you fill in the strings inside the jQuery dollar function. NetBeans knows the return type of the dollar function so we're only presented with jQuery methods here:
jQuery methods return the jQuery object itself as the return value, so we can chain calls into jQuery. We'll do that here by calling a function on the return value from addClass:
As you can see, when NetBeans knows the return type of a function, it's shown in code completion item separated by a colon. Here I want to call the queue() method which returns an array of functions. Let's see what happens if we just call functions on the result object:
As you can see - we're getting methods on the Array class, since we're getting an array back. Let's pick a specific element in the array instead, and see what code completion g...
Date: April, 29 2008
Url: http://blogs.sun.com/tor/entry/javascript_type_inference
Others News
Leave a Reply
Related
- Type Inference for Scripting Languages If the type inference algorithm succeeds, then the program is typeable. Therefore ... This demonstrates the core JavaScript features we have included: 1. creating objects using ...
- Towards type inference for Javascript — CiteSeerX citation query Scientific documents that cite the following paper: Towards type inference for Javascript, by C Anderson, P Giannini, S Drossopoulou
- JavaScript Type Inference In NetBeans / April 2008 April 2008: JavaScript Type Inference in NetBeans, Sun Microsystems Extends World's First Open Storage Platform with New Services and Tools in OpenSolaris Operating System, Not ...
- Ajaxian » JavaScript Type Inference in IDEs 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 ...
- Computing Publications : Towards Type Inference for JavaScript Main campus address: Imperial College London, South Kensington Campus, London SW7 2AZ, tel: +44 (0)20 7589 5111 Campus maps and information
- Efficient Just-In-Time Execution of Dynamically Typed Languages Via ... ... Dynamically Typed Languages Via CodeSpecialization Using Precise Runtime Type Inference ... Using this technique, we treat every possible combination of run-time type in a JavaScript ...
- Type Inference for JavaScript Abstract Object-oriented scripting languages like JavaScriptare popular, in part because of their dynamic features. These include theruntime modification of objects and classes ...
- CiteSeerX — Towards type inference for Javascript CiteSeerX - Document Details (Isaac Councill, Lee Giles): Abstract. Object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic ...
- Towards Type Inference for JavaScript (ResearchIndex) Object oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. These include the runtime modification of objects and classes ...
- The Cafes » Type Inference: Another Bad Idea for Java 7 Actually, neither mainstream JavaScript nor PHP have type inference. I think you’re looking for ML and Haskell….and by the way, those languages are more strongly typed than Java
- JavaScript Type Inference in NetBeans 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 ...
- Java Community News - Elliotte Rusty Harold on Type Inference for Java ... Javascript doesnt have type inference, but it does have dynamic typing. At its simplest, type inference saves keystrokes: Dictionary<Foo<Bar,Baz>,Bonk<Zoink,Zargh>> dict = new ...
- Publications of the SLURP group Towards Type Inference for JavaScript Christopher Anderson, Sophia Drossopoulou, Paola Giannini ... July 2005 Conference or Workshop Paper Presented at 19th European Conference ...
- Tor Norbye's Weblog Tuesday April 29, 2008 JavaScript Type Inference in NetBeans. Roman Strobl has just published a screencast of the new JavaScript editor in NetBeans 6.1.
|