Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why I don’t like the lens library (fvisser.nl)
11 points by hamidr on Oct 13, 2013 | hide | past | favorite | 5 comments


I can sympathize with this post. I've used lenses a handful of times now in my Haskell, and I find myself using them generally for the same thing every time. I feel like my use case with lenses is a tiny fraction of the lens library is capable of doing and I'm sort of perplexed what I'd use the rest of the library for. That's not bashing on the library at all, I think it's totally awesome, I just only use it for one thing, basically. It's a HUGE-ly engineered beast. I'm sure Edward Kmett knows what he's doing way more than I do.

It's not that hard to implement a little lens type and make the basic functions you want on it (without the template Haskell goodies, of course). I've also done that in at least one case. I'd really like to learn some of the more advanced things I can do with the lens library, though.


Sorry for the plug, but here's a tutorial I just wrote that I hope helps with this difficulty: https://www.fpcomplete.com/user/tel/a-little-lens-starter-tu...


No apologies necessary. Thanks for sharing this with me!


The comments in the reddit thread[1] are worth reading, especially those by the author of this library, edwardk.

[1] http://www.reddit.com/r/haskell/comments/1o6iqs/why_i_dont_l...


The title should have a Haskell tag.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: