4 ms·
Lens is one guy's pathological abstraction. It's a library, and it's idiosyncratic. It isn't want large Haskell systems "look like". Cf http://ro-che.info/arti
by dons 12y ago
Lens is one guy's pathological abstraction. It's a library, and it's idiosyncratic. It isn't want large Haskell systems "look like".
Cf http://ro-che.info/articles/2014-04-24-lens-unidiomatic.html http://ro-che.info/articles/2014-04-24-lens-unidiomatic.html
- cousin_it 12y agoI agree that Lens is extreme, that's why I picked it as an example. However, most Haskell code I've seen also has line-noise problems, though not as extreme as Lens. Maybe I just haven't been lucky. Can you point to some good examples of readable Haskell code?
- deleted 12y ago[deleted]
- freyrs3 12y agoIf you work with Java/C/C++ then the way you structure, compose, and think about programs is mostly entirely different from Haskell. Any of the examples I might point to as idiomatic Haskell are going to be "unreadable" ( if that words means anything ) within that worldview, because they come with an entirely different set of constraints and culture than the Java/C++ world.
- ridiculous_fish 12y agoThe most-unreadable Haskell code I've found is from Matrix.Simplex (https://hackage.haskell.org/package/dsp-0.2.2/docs/src/Matrix-Simplex.html https://hackage.haskell.org/package/dsp-0.2.2/docs/src/Matri...) : addart a = array ((-1,0),(n,m+n)) $ z ++ xsi ++ b ++ art ++ x where z = ((-1,0), a!(0,0)) : [ ((-1,j),0) | j <- [1..n] ] ++ [ ((-1,j+n),a!(0,j)) | j <- [1..m] ] xsi = ((0,0), -colsum a 0) : [ ((0,j),0) | j <- [1..n] ] ++ [ ((0,j+n), -colsum a j) | j <- [1..m] ] b = [ ((i,0), a!(i,0)) | i <- [1..n] ] art = [ ((i,j), if i == j then 1 else 0) | i <- [1..n], j <- [1..n] ] x = [ ((i,j+n), a!(i,j)) | i <- [1..n], j <- [1..m] ] ((_,_),(n,m)) = bounds a One letter variable names, argh!
- platz 12y agoreminds me of algos in matlab