|
|
|
|
|
by cm3
3645 days ago
|
|
Not trying to sound snarky, serious question: Is it due to Edward's (over)use of the type system, making it fit (however complex) into the Haskell system? Could a more expressive system like Idris have avoided the complexity? If so, I'm certain there is a simple implementation of the lens idea that's much easier to understand and apply. |
|
If you just had a small subset of the library that only exposed, say, Lens, Traversal and Prism, it would be much more approachableābut would also miss out on much of what makes lens so universally useful. It wouldn't hit all the edge cases lens does and it wouldn't be "batteries included". You'd find yourself ultimately reinventing part of the other abstractions that lens has but, since you're doing it independently and ad-hoc, the result would be uglier.