optics-dev / optics-dev/Monocle

[Focus] Non-case class setters in?

Open
#1,035 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Dual to #1034, conceivably someone, wishing to have write-only semantics on their immutable data model, might implement their own copy method. I can't even think of a use case for a Setter optic to be honest, I'm sure this is extremely low priority, and I can't imagine user demand leading us here.

There's a little voice in my head complaining that Setter is the only optic inaccessible to the Focus macro, but I'm not at all sure it deserves to be listened to.

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 reading the Focus macro and the Setter optic, then compare this proposal with issue #1034. The issue is exploratory and does not identify files, tests, a concrete use case, or a definition of done, so the desired behavior would need to be clarified before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.