lawful lenses
See original GitHub issueR.lensProp
and R.lensIndex
aren’t quite lawful, as @scott-christopher explained in https://github.com/ramda/ramda/issues/1281#issuecomment-209444109.
Scott, have you any interest in working on Sanctuary equivalents of Ramda’s lens functions, which would use the Maybe type where appropriate to satisfy the lens laws?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:9 (7 by maintainers)
Top Results From Across the Web
On Lawful Lenses - Statebox
Lawful Lenses are a Constant Complement ... It is quite easy to check that a simple constant complement lens respects the three lens...
Read more >nLab lens (in computer science)
Lawful lenses are an algebraic structure which axiomatize product projections. The laws govern the ways views and updates relate.
Read more >Three lenses on legal: a framework to shape the future legal ...
EY teams have seen the legal function being measured through three lenses: value contribution; risk management, and efficiency, flexibility and ...
Read more >Legal Lens - Kindling Group
Legal Lens is a five-part digital documentary series and engagement campaign about how the law shapes — and is shaped by — the...
Read more >julesh on Twitter: "The category of not-necessarily-lawful lenses has ...
It's purely because lawless lenses are so useful Lenses were originally intended as data accessors, and the lens laws are *true* for data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@protoEvangelion and @coodoo, lenses will be the next major addition to Sanctuary.
As it may be of interest, I will share the backstory. In order to define van Laarhoven lenses, which have the desirable property of being compatible with
S.compose
, we need two types:Identity a
andConstant a b
. The former exists as sanctuary-identity; the latter will exist once sanctuary-js/sanctuary-constant#1 has been merged. As I was working on sanctuary-constant I was also working on fantasyland/fantasy-land#315, a proposal that will, if accepted, necessitate changes to every Fantasy Land -compliant ADT. It seemed sensible at the time to release a new major version of the Fantasy Land specification before publishing any new ADT packages.In mid 2019 I started a full-time job, as I was running out of money. My ambitious plans may have made sense when I had a lot of time to devote to Sanctuary, but when the demands on my time increased I should have reconsidered them. The Fantasy Land changes are themselves several weeks of full-time work, as they involve updating fantasy-laws and the many Sanctuary ADTs.
Let’s finalize and merge sanctuary-js/sanctuary-constant#1 without waiting for fantasyland/fantasy-land#315. We will then have what we need to define
S.lens
,S.view
,S.over
, andS.set
. Later, once FL5 has been published, we will releasesanctuary-constant@2.0.0
.@davidchambers is there anything on the roadmap still for implementing lenses?