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

Renaming optics type parameters #1048

Open
kenbot opened this issue Feb 11, 2021 · 1 comment
Open

Renaming optics type parameters #1048

kenbot opened this issue Feb 11, 2021 · 1 comment
Labels
3.x Next major version

Comments

@kenbot
Copy link
Collaborator

kenbot commented Feb 11, 2021

The traditional STAB naming of type parameters is obscure and a barrier to learning.

Proposed new names:
PLens[SourceIn, SourceOut, TargetOut, TargetIn]
Lens[Source, Target]

to be applied consistently across all code.

Question: what should we do about short variable names or lambda arguments, where we normally would use s, t, a or b? si, so, to, ti? sIn, etc?

@kenbot kenbot added the 3.x Next major version label Feb 11, 2021
@julien-truffaut
Copy link
Member

Great idea, we should document whatever we decide for argument naming convient in a contributor.md

My vote go for: source, target if there is no ambiguity. Otherwise, sourceIn, sourceOut, targetIn, targetOut.

I also prefer update for TargetIn => TargetOut or TargetIn => F[TargetOut]
and predicate for Target => Boolean

BTW, I think it should be PLens[SourceIn, SourceOut, TargetIn, TargetOut] (last two type parameters swapped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Next major version
Projects
None yet
Development

No branches or pull requests

2 participants