logoalt Hacker News

sirwhinesalotyesterday at 1:54 PM0 repliesview on HN

Languages with refinement types (or contracts) like Dafny and Liquid Haskell can typically handle numerical predicates directly. Some can even handle string predicates directly, including regular expressions. They also allow you to write complex predicates as separate functions, albeit with limited expressiveness.

But you hit performance and/or outright computational limits (halting problem) rather quickly.