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.

No comments: