3 ms·
Scala has exceptions so this is untrue no?
by fire_lake 2y ago
Scala has exceptions so this is untrue no?
- hocuspocus 2y agoCats Effect and ZIO eventually catch unhandled exceptions but you are right, there's no way to know for sure, we're merely assuming that 1) Scala libraries have a sane behavior (i.e. no exceptions at all) 2) the developer is familiar with the Java libraries they're wrapping and will use IO.attempt pervasively. However, in the near future, the compiler itself should be able to handle all exceptions statically: - https://docs.scala-lang.org/scala3/reference/experimental/canthrow.html https://docs.scala-lang.org/scala3/reference/experimental/ca... - https://docs.scala-lang.org/scala3/reference/experimental/cc.html https://docs.scala-lang.org/scala3/reference/experimental/cc...