Skip to content

Comment on Lens: Lenses, Folds and Traversalsparent

Comments

Haskell's design prioritizes referential transparency and equational reasoning, which would be compromised by imperative get/set operations that mutate state directly - lenses provide a purely functional alternative that maintains these properties.

That’s why I said at the grammar level and not at semantic level. I also brought the do-notation example, which kinda gives an imperative interface to the various monads

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.