bfpg / talks

Brisbane Function Programming Group talk ideas, scheduling & archival
https://talks.bfpg.org
Creative Commons Zero v1.0 Universal
4 stars 5 forks source link

Why `lens` and not plain van Laarhoven lenses? #30

Open peddie opened 8 years ago

peddie commented 8 years ago

From #bfpg:

peddie:

so lens and the new abstractions it provides are way, way more than just first-class records, but I'm not sure I've seen this articulated well for people who aren't already familiar with them

nkpart:

I agree. there seems to be enough material on lenses. but why lens the package over microlens

frase:

"ed wrote it" is a good enough reason to use lib A over lib B in 99% of cases :)

peddie:

pretend I'm a beginning haskeller: I don't know who ed is; all I know so far is that I get 22 pages of category theory, which I don't understand, in my cabal build log if I pull in 'lens'. why do I want traversals? prisms? plated? why are they all provided by one library? what are the engineering tradeoffs here? why not use the simplest van Laarhoeven lenses and just 'over' and 'view'? I often struggle to answer these questions clearly even to myself

This is a talk request; I don't feel qualified to give this talk, and I'm not sure how I'd approach it.

benkolera commented 8 years ago

This would be really good to pair with a lets-lens workshop/hack night.

https://github.com/NICTA/lets-lens

endgame commented 4 years ago

microlens is an extract of things from lens which are implementable using only the tools from base.

The big one is that you can't write proper prisms without the Choice typeclass from profunctors.