You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the .name syntax, get and set modes generate the most general possible optics, Getters and Setters respectively. This means that more code can participate, such as no-arg methods with no copy method. Because we already know what we want to do with it (ie "get", "set"), there is no need for more capable optics to be selected.
Conversely, lens mode produces an optic; we don't know how the user will use it. Therefore, we should choose maximally capable, specific optics, rather than constrained generic ones. Currently, Lenses will be generated.
In lens mode, where a target value is known to be isomorphic to the source object (ie a one-argument case class), then an Iso should be generated instead of a Lens.
The text was updated successfully, but these errors were encountered:
Using the
.name
syntax,get
andset
modes generate the most general possible optics,Getter
s andSetter
s respectively. This means that more code can participate, such as no-arg methods with no copy method. Because we already know what we want to do with it (ie "get", "set"), there is no need for more capable optics to be selected.Conversely,
lens
mode produces an optic; we don't know how the user will use it. Therefore, we should choose maximally capable, specific optics, rather than constrained generic ones. Currently,Lens
es will be generated.In
lens
mode, where a target value is known to be isomorphic to the source object (ie a one-argument case class), then an Iso should be generated instead of aLens
.The text was updated successfully, but these errors were encountered: