optics-dev / optics-dev/Monocle

Renaming optics type parameters

Open
#1,048 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

3.x
Dominant language
Scala
Stars
1.7k
Forks
207
Avg merge
7h 59m
Merged PRs (30d)
5

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the definitions and usages of PLens and Lens across the Scala codebase. Determine how the proposed SourceIn, SourceOut, TargetOut, and TargetIn names apply consistently, then resolve the convention for short variable names and lambda arguments. Done means the naming decision is documented and applied throughout the code.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
developer-experience
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.