Understanding the use of `unsafe-` and `safe-` functions in Effect TypeScript library internals
I've noticed in the internals for a lot of the packages (@effect/printer eg) there is a pattern of using
I'm wondering what the benefit of this pattern is for library internals? My understanding is that
unsafe- and safe- functions which are ultimately unwrapped using Effect.runSync. For example:I'm wondering what the benefit of this pattern is for library internals? My understanding is that
Effect.runSync is sort of the boundary layer between effect and the edge of the program, so I'm a little suprised to see if at such low levels here, but maybe I'm missing something.