question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

R.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:open
  • Created 7 years ago
  • Reactions:17
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
davidchamberscommented, Dec 3, 2019

@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 and Constant 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, and S.set. Later, once FL5 has been published, we will release sanctuary-constant@2.0.0.

4reactions
protoEvangelioncommented, Oct 19, 2019

@davidchambers is there anything on the roadmap still for implementing lenses?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found