you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 2 years ago

You don't want to use exceptions in normal control flow, because they're extremely slow. Every time you throw an exception, it has to collect a stacktrace, which is hundreds, if not thousands, of calculations, compared to a handful of calculations for returning a boolean or an enum variant.

  • source
  • parent