3 ms·
Maybe naive question, but what if a UCP packet comes in that doesn’t meet the requirements of the parser? Undefined behavior?
by hyperhello 3y ago
Maybe naive question, but what if a UCP packet comes in that doesn’t meet the requirements of the parser? Undefined behavior?
- marcosdumay 3y agoThe type system removes checks that are redundant or unnecessary given the rest of the code. It doesn't assume things about external data.
- moomin 3y agoYeah, anything you assert has to be proved at runtime. Liquid Haskell just a) checks your assertions are consistent with the type returned and b) avoids you having to check again. You could theoretically remove all the unnecessary checks by hand, but it’s tricky.