3 ms·
> chances are that if it type-checks, it is correct. a - b type checks where b - a or a + b should have been written. shuffle(list) type checks where sort(lis
by kazinator 8y ago
> chances are that if it type-checks, it is correct.
a - b type checks where b - a or a + b should have been written.
shuffle(list) type checks where sort(list) should have been written.
sin(x) type checks where cos(x) is required.
The type of the average application code contains very little information. The crucial difference between sin and cos gets bulldozed; both are just number -> number.
- ernst_klim 8y agoPowerful enough type system will catch all of these though.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- kazinator 8y agoRight, only you don't know what it's called, where to download it, or how to write the code.
- ernst_klim 8y agoWhy? I do. Search for dependent types. https://github.com/FStarLang/FStar https://github.com/FStarLang/FStar
- deleted 8y ago[deleted]
- kazinator 8y agoCalling your bluff; you've never used this.
- ernst_klim 8y ago>only you don't know what it's called, where to download it, or how to write the code. >you've never used this. What next? You've asked for an example of powerful typesystem, here, you got it. Other examples are SPARK, Coq, Liquid Haskell, Idris, C++20, Agda.