3 ms·
I've been through this a few times. It puts me off Haskell even more each time. Bear in mind I'm pretty handy with obscure obfuscated by default things like RP
by hp50g 14y ago
I've been through this a few times. It puts me off Haskell even more each time.
Bear in mind I'm pretty handy with obscure obfuscated by default things like RPL, Forth and Perl and occasionally common lisp.
- tome 14y ago> It puts me off Haskell even more each time. How come?
- hp50g 14y agoIt's not the tutorial specifically - more Haskell itself: Syntax feels slightly horrid. Doesn't seem to visually or syntactically scale well with the size of the problem at hand. Some of it is plain ugly (records). It's harder than the others resulting in more head scratching. Debugging is slightly painful. These are all IMHO. To be fair, I'm going to do the tutorial again this afternoon.
- dons 14y agoWhat do you mean "syntax doesn't syntactically scale" ?
- hp50g 14y agoA single function/expression tends to drag over too much space for my liking. It's hard to break down some of them into functional units that fit in my head properly. Perhaps I'm just thick :) Look at List.hs (sort/sortBy) for what I mean: http://hackage.haskell.org/packages/archive/base/latest/doc/html/src/Data-List.html http://hackage.haskell.org/packages/archive/base/latest/doc/...
- pilgrim689 14y agoThat sortBy is split into 6 sub-functions, all 2 to 4 lines each. You want it more broken down?
- hp50g 14y agoFair point. I will do the tutorial again! :) I might get it if I keep trying. (ironically I did an engineering degree which was rather maths heavy so I should get this).
- tinco 14y agoThat looks like a very tidy implementation to me.. I think the problem is that because its split into so many helper functions you don't really know where the code is going, but if you follow through I think this code eventually fits in your mind better than an imperative version would.
- nilkn 14y agoThat is actually really clean code. Haskell can just take some time to get used to. The code is laid out differently and the use of curried functions and point-free styles can throw you off coming from imperative code.