3 ms·
For what's it's worth, I never found a use for optics. The idea is that you declare read/write optics than you then compose and reuse. But on a web app, say,
by boubiyeah 9y ago
For what's it's worth, I never found a use for optics.
The idea is that you declare read/write optics than you then compose and reuse.
But on a web app, say, in how many places can you update a person's address?
Writing non generic code that update it in a non generic way (throw away code) is much less ceremony than defining an optic and only using it once.
- KirinDave 9y agoIn this case the optics are used as a way to select state in the coupling construct. You don't use them to read values out of the form, you use them to explain to the components how to pull or update their state out of the shared construction.