Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate all applyX methods and operators in favor of optics method #1003

Merged
merged 1 commit into from
Dec 25, 2020

Conversation

julien-truffaut
Copy link
Member

  1. deprecate applyX, e.g. applyLens, applyGetter
  2. deprecate symbolic aliases to applyX e.g. &<->
  3. add optics method which transaform any value a: A into a ApplyIso[A, A, A , A] i.e. a partlially applied optics that points to itself

What do you think of optics name? it needs to be short.

@@ -23,62 +25,79 @@ trait ApplySyntax {
new ApplyTraversalOps(value)
}

final case class ApplyOpticsOps[S](private val s: S) extends AnyVal {
def optics[T, A, B]: ApplyIso[S, S, S, S] = ApplyIso(s, Iso.id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine

Copy link
Collaborator

@cquiroz cquiroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julien-truffaut julien-truffaut merged commit a3a7045 into master Dec 25, 2020
@xuwei-k xuwei-k deleted the deprecate-applyX branch September 25, 2021 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants