13.6.06

typed scripting? typescript


Types are good, but a language aiming to resemble JavaScript should leave type annotations optional wherever possible. Palsberg and Schwartzbach have something to say about type inference for object oriented programs.


What would types be good for? There's all those "message-not-understood" (and so on), but there is also fancier stuff like Session types for channels, or regexp-like types for semistructured data.


JavaScript is object based, but not class based. Abadi and Cardelli's "A Theory of Objects" is the standard reference on object calculi. "Type inference for JavaScript" introduces a calculus for modeling JavaScript.



Castagna provides an account on overloading in the publication that came out of his thesis, titled
"Object-Oriented Programming: A Unified Foundation". The thing with overloading is that it might give a more precise type to pattern matching statements, an idea that haunts me since ages.

8.6.06

JavaScript2


Brendan Eich's XTech 2006 keynote JavaScript 2 and the Future of the Web mentions some deltas to the language. This is warmly welcomed on LtU, who add a new JavaScript department.



One of the typing experts sitting int the committee, Cormac Flanagan, has worked on SAGE: Practical Hybrid type checking for Expressive Types and Specifications[pdf]


Not to be confounded with ECMAScript 4, the next version of JavaScript 1, designed by committee ECMA TC39TG1. They get proposals from Mozilla guys, and recently published their Wiki, which also is half-heartedly discussed on LtU.