4 ms·
> The following program (in pseudo-Python) shows a program which will fail to type check in any sound static type system which I know of ... I think (haven't c
by chalst 14y ago
> The following program (in pseudo-Python) shows a program which will fail to type check in any sound static type system which I know of ...
I think (haven't checked) that the equivalent of that code will type just fine in Typed Scheme [1] and this kind of type system has been studied since the 70s as intersection types and have found a fair amount of application in type systems for compiler intermediate representations (because they fit well with optimisations involving type specialisation).
He's quite right to say that you can always find such untypeable examples for static type systems that are reasonable (esp. that they have an acceptable complexity for type inference).
[1]: http://www.ccs.neu.edu/home/samth/typed-scheme/ http://www.ccs.neu.edu/home/samth/typed-scheme/