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 urbanslug

6 years ago

This wouldn't be a problem if people wrote programs in languages that have proper type systems that can correctly classify failure.

I'm thinking of types such as Maybe/Option or Either.

I hate it for example when a C/C++ function has to return a -1 in case of failure.

0 comments

urbanslug

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities