Skip to content

Support for rudimentary optics #105

@Madoc

Description

@Madoc

If the plugin would be extended by an option to generate lenses, it could output additional generated code similar to this:

object MyType {
  // autogenerated code ...
  val X:Lens[MyType,Int] = Lens(_.x, _.withX)
}

This would greatly help the user of the plugin to write deeply nested property modifications in a comprehensive manner, by combining lenses. It should not matter much which of the popular Scala Optics libraries would be supported, as long as it's as least one.

Adding those lenses manually is tedious and subverts the idea of code generation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions