evertedsphere / silica

optics for Haskell with the most amazing type errors you've seen
BSD 3-Clause "New" or "Revised" License
243 stars 7 forks source link

Beginner lens / optics questions and points of confusion #2

Open mrkgnao opened 6 years ago

mrkgnao commented 6 years ago

If there's something about optics you don't understand, please talk a little about it below.

Format

Include:

Code samples, type errors, and so on are also good if you have some.

All levels of experience welcome!

The process

Project maintainers will leave a :+1: reaction to indicate that we understand your question and that it has been added to a list.

This will help keep the issue free of useless "good point!" comments. If we have any further clarifications to ask for, we will do so.

Credits

@modernserf suggested we do this, i.e. collect questions that beginners are likely to have.

Current list

Kansattica commented 6 years ago

As an absolute Haskell beginner, what problem does this solve? Why would I want to use one of these libraries, and why are there so many of them to choose from?

ror6ax commented 6 years ago

How are lenses different from getters/setters in OO languages? They do look very much similar.

ror6ax commented 6 years ago

Are there any "lens laws"?