Closed freizl closed 2 years ago
那天看到的时候微博上还转了个文章说 gradual typing 是怎么回事的, http://homes.soic.indiana.edu/jsiek/what-is-gradual-typing/
大概是觉得做得不够彻底吧
Several languages already have optional type annotations, but surprisingly, there had been little formal work on what a type checker should do with the optional type annotations and what kind of guarantees the type system should provide.
我大概扫了一下他的doc (http://hacklang.org/), stack checking 从来都很吸引人,但是我十分之不解的就是 FB给Hack加上了explicit type annotation.
我的问题是:
为什么要这么做? 不加type annotation我也可以给dynamic type language 做 静态类型的checking啊(最简单的。。。王垠不是就搞出来过python , ruby的static type checking 么。。。。用的是Abstract Interpretation..所有formal method里面我觉得最神秘的一个。。。@@)
再退一步说,有了explicit的type annotation,dynamic typing 还是dynamic typing么?
大家觉得呢?