Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by astrange

11 hours ago

Anything with ranged numeric types. Like everyone's favorite functional programming language, Ada.

2 comments

astrange

Reply

ghaslt  11 hours ago

This issue raises SIGFPE. Ada would raise Constraint_error, which is easier to catch than a signal, but still occurs at runtime.

You need range proofs to be 100% safe, and then you can as well use the regular type because invalid values will not occur.

black_knight  11 hours ago

Or Liquid Haskell.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities