Static typing where possible, dynamic typing when needed

 

From the discussion paper by authors Erik Meijer and Peter Drayton, as reported on Lambda the Ultimate:

Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities.

The paper goes on to list 8 different static or dynamic language behaviors that programmers rely on, and in most cases this critical feature of the language has little or nothing to do directly with the static/dynamic choice.

Favorites are "I want contracts" from the static typing camp, and "I want higher order functions, serialization, and code literals" from the dynamic camp.  I think ‘GetHashCode’ from Java and C#/CLR show how static typing can fail at contracts, while C++ TR1 function and CLR delegates show how most higher order functions can work in static languages (although recursively defined function types can still be a problem).

In (seemly) unrelated research I’m doing for my parser writing hobby, these two authors came up again in another blog, Monadic Parser Combinators using C# 3.0, and also looks to be of some interest, but not  directly on programming language front.

The paper is also available on Meijer’s Microsoft research page, at http://research.microsoft.com/~emeijer/Papers/RDL04Meijer.pdf

Leave a comment

Your email address will not be published. Required fields are marked *