|
|
|
|
|
by seanmcdirmid
4089 days ago
|
|
> The point is that when most programmers hear the word "typechecking", they think of compile-time typechecking. This word is usually used in a static context. Most programmers don't think "dynamic type checking" is a misnomer, while it is true that "type checking" itself leans towards a static connotation. I've seen gradual type checking used both ways in the literature, actually. Wiki has the term defined for dual phase: http://en.wikipedia.org/wiki/Gradual_typing > Gradual typing is a type system in which variables may be typed either at compile-time (which is static typing) or at run-time (which is dynamic typing), allowing software developers to choose either type paradigm as appropriate, from within a single language. I'm sure this is just poor writing (as Siek defines it, it should be from dynamic to static), but there is enough confusion here where you might bother using the term for adding stronger dynamic type checks to an otherwise less dynamically typed language (if you admit dynamic types as types, of course). Also, a dynamically checked type signature is the first step to a statically typed one (as long as your types remain weak enough that static typing is achievable in the future). So in that sense, it is "gradual" typing, just from a meta perspective :) |
|