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 Leherenn

5 years ago

> Not to mention a map will always introduce null or option types that you have to handle.

It is the same with the switch, at least in C/C++. You either have a default, or must list all the possible cases and still return something "at the bottom".

1 comment

Leherenn

Reply

slaymaker1907  5 years ago

This is becoming an increasingly less common strategy for languages to take given the popularity of sum types.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities