- What do you think about ZIO’s typed errors? How do you think they help to write better applications?
Having typed errors is fundamental in order to write code that takes care of handling the edge cases, if you don’t have type information when calling a specific effect you cannot know what you may need to handle. At the moment typed errors are still limited in usability by Scala’s capabilities of dealing with unions, namely in Scala 2 unions are represented as sealed traits and you are forced to have an AppError tree with beneath a hierarchy of errors instead with the advent of Scala 3 it will be possible to represent errors using unions getting rid of the need for a big tree of sealed traits.
- What do you think are the advantages of ZIO’s Fibers over Threads, when writing concurrent applications?
Fibers are extremely lightweight compared to threads and in ZIO they provide even a more rich api and set of capabilities. One of the huge innovations that ZIO introduces is the concept of a fork scope and a su