8 ms·
My problem with the operators is they screw up function composition. `over`, `set`, `view`, `firstOf`, `toListOf` compose normally with the datastructure on the
by spopejoy 11y ago
My problem with the operators is they screw up function composition. `over`, `set`, `view`, `firstOf`, `toListOf` compose normally with the datastructure on the right. The operators flip this and therefore require the dumb `&`.
It's kind of like diagrams with `#`. I don't accept the argument that if it's a lens or a diagram, our meager brains can't comprehend right-to-left composition anymore.
Worst of all is when there isn't a non-infix alternative, effectively forcing you to use the soup. Case in point: `%=`.
- tel 11y agoThe non-infix names are a bit more conservative, yes, but it's easy to define your own of course. And to even argue back about $ and & is pretty bike-sheddy. It's just a choice that was made.