5 Matching Annotations
- Dec 2021
-
app.gumroad.com app.gumroad.comGumroad2
-
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
-
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.
-
- Aug 2021
-
zio.github.io zio.github.io
-
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
-
-
zio.github.io zio.github.io
-
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.
-
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.
-