2 ms·
Note that this post is from October 2010, and it appears that the magpie repo[0] hasn't been committed to in over two years. In addition, the static type system
by seliopou 11y ago
Note that this post is from October 2010, and it appears that the magpie repo[0] hasn't been committed to in over two years. In addition, the static type system was ripped out of the language about six months after this blog post was written[1].
This is understandable, given that the approach to typing seemed pretty ad-hoc, really unsafe, and somewhat incoherent. The whole point of a type system is to say something about the runtime behavior of a program before you actually run it. To actually execute fragments of your program as part of the type checking step, then, sortof defeats the purpose. Not only that, but typing can fail while producing side effects in your system, some of which may be harmful (launching the nukes, etc.) There are some systems that do _abstract_ interpretation at this point, but that is a model of an execution, not an actual execution, and is therefore sound in the sense that it will not perform random mutations in this strange running/not running superposition.
[0]: https://github.com/munificent/magpie https://github.com/munificent/magpie
[1]: https://github.com/munificent/magpie/commit/58742b0e7f3431c14d29a62c843ed332ed465fbd https://github.com/munificent/magpie/commit/58742b0e7f3431c1...
- tel 11y agoThere are plenty of languages which evaluate fragments of your program as part of the checking step. Simple ones are not even that difficult to write. http://www.andres-loeh.de/LambdaPi/LambdaPi.pdf http://www.andres-loeh.de/LambdaPi/LambdaPi.pdf
- skybrian 11y agoPerhaps compare with Julia, which has a dynamic type system, parameterized types, and multimethods. But it's not trying to do static type checking; the types are for performance and runtime checks.