Re:C++ at Google: Here Be Dragons
by swannodette on Monday May 23, 2011 @07:42PM
(#2578051)
Those in favor of only static typing and those in favor of only dynamic typing are living in the past. Any interesting evolution in programming languages will allow developers to program with and without types / contracts from the same language.
[ Parent
| on HN ]
In Mascara (my own project) you can start out with dynamically typed JavaScript, but then gradually add type annotation as appropriate to provide stronger verification. It can be done using structural types without changing the runtime semantics, and further by rewriting to use classes and nominal typing.
I think this provides a useful upgrade path, because type verification is a hassle with small projects, but becomes increasingly valuable (IMHO) as the program grows.
The problem with current languages is that you have to decide upfront if you want a language optimized for quick development or strong verification. But often in the real world, programs start out as quick prototypes, and then grow into large applications.
Re:C++ at Google: Here Be Dragons
by jorgeortiz85 on Monday May 23, 2011 @07:49PM
(#2578068)
C#'s new "dynamic" type and Scala's new Dynamic trait are a step in that direction.
Qi is a lisp-like language with Haskell-style type-checking which can be turned on and off at will:
http://en.wikipedia.org/wiki/Qi_(programming_language)#Type_...