2 ms·
Presumably it will reject it with a helpful message like "no"? I think that's the main disadvantage of these types. It's now no longer a decidable system with
by IshKebab 3y ago
Presumably it will reject it with a helpful message like "no"?
I think that's the main disadvantage of these types. It's now no longer a decidable system with (usually) easy to understand error messages. You're in the realm of formal verification and SMT solvers where the only error message is "didn't work; try something else".
Probably still good but I think it's important to be aware of the downsides.
- robertlagrant 3y agoYes, that was my first thought. As long as there's a good way to map from the real world into the liquid typed world, either by just telling the liquid typed world that this value can only be a positive integer, or by the liquid typed world having functions that ensure this at the boundary and return nice errors on runtime failure of this check, then it sounds really interesting.