5 Matching Annotations
  1. Dec 2021
    1. ZLayer provided a very clean solution to the problems developers were havingwith ZIO Environment—not perfect, mind you, and I don’t think any solutionprior to Scala 3 can be perfect (every solution in the design space has differenttradeoffs). This solution became even better when the excellent consultancySeptimal Mind donated Izumi Reflect to the ZIO organization
    2. Has can be thought of as a type-indexed heterogeneous map, which is type safe,but requires access to compile-time type tag information. ZLayer can be thoughtof as a more powerful version of Java and Scala constructors, which can buildmultiple services in terms of their dependencies.
  2. Aug 2021
    1. We can also define these properties for data types that we do not control, for example providing a custom way of hashing a data type implemented by someone else
    1. However, there is a definite trade off in these three snippets. The first one is overly specific but is understandable to any Scala programmer. The last one is beautiful and elegant if you understand the necessary concepts but incomprehensible otherwise.
    2. ZIO ecosystem libraries generally do not directly expose any functional abstractions but still expose a highly compositional interface because their design is based on algebraic properties like this. Users don't have to learn about these abstractions unless they want to, they just get to benefit from better library design.