| > C++ doesn't have bounds checks in the std library in release builds by default, so you can't get better than that. In Haskell you can provide your own prelude, which uses unsafe functions without bounds checks by default. With CPP or cabal tricks, you can easily have bounds checks only for debug builds, but no bounds checks for release builds. No Liquid Types needed either, though this is only testing in development but not compile time verification. Less safe, but same effort and result as in C++. > loops and bounds checks are complex in the first place isn't true. Liquid Types people are not thinking about only loops and bounds checks. They think about any properties, for example: * pointer checks, a huge security issue, see [1] or https://news.ycombinator.com/item?id=37376946. * valid expression checks (Beyond Bounds Checking of [2]), see https://news.ycombinator.com/item?id=37440896. [1]: https://arxiv.org/abs/2207.04034 "Flux: Liquid Types for Rust" [2]: https://www.tweag.io/blog/2022-01-19-why-liquid-haskell/ "Why Liquid Haskell matters" Sorting 5 numbers is complex in the first place isn't true. No other technology invests so much complexity as programming and this is barely an issue in modern problem solving in the first place. My previous comments already said loops and bounds checks are not complex in the first place, and they are only used as a demo in a talk, as Liquid Types scale to handle any properties. I am pretty certain that a reasonable reader can judge the merits of our arguments and make up their mind. Thanks for raising a possible misconception about Haskell and Liquid Types, and this forced me to strengthen the arguments to clear the misconception for other reasonable readers. This is my last comment on this issue. |
So your solution is to rewrite the haskell standard library yourself?
With CPP or cabal tricks
I don't know what cabal tricks is supposed to mean here.