4 ms·
If only. Prolog is actually reasonably pleasant to program in. Accidentally Turing Complete type systems are usually not all that pleasant in practice. Example
by lomnakkus 10y ago
If only. Prolog is actually reasonably pleasant to program in.
Accidentally Turing Complete type systems are usually not all that pleasant in practice. Examples: C++ Templates, and now it seems, Rust.
EDIT: Just because people may not know this: A relevant quote by Alan Perlis: "Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy." This applies to type-level programming as it does any type of programming.
EDIT#2: Also, look into Shen for a principled way to do this type of thing.
- dkarapetyan 10y agoHence the ad-hoc part. I don't think people go into writing a type checker and type inferencer thinking they're gonna re-implement Prolog.
- PeCaN 10y agoOTOH, if you're a Prolog programmer and you write a type checker, you rather quickly realize what's going on ;-)