News for hackers. Stuff that matters.
Re:Lenses: Composable Getters and Setters for Functional Pro... by marcosdumay on Monday December 24, 2018 @11:42AM (#18752895)
Lens are about composition and abstracting your operations over unknown structures. I don't know where did you find anything about immutability, as plain data accessors are perfectly fine for that.

The motivation on the article is basically this paragraph:

"Lenses allow you to abstract state shape behind getters and setters. Instead of littering your codebase with code that dives deep into the shape of a particular object, import a lens. If you later need to change the state shape, you can do so in the lens, and none of the code that depends on the lens will need to change."

Immutability does not make its way there.

There are no comments on this comment yet.