
8 Jan
2001
8 Jan
'01
6:07 a.m.
I'm constantly amazed by the number of tricks one has to know before he can write concise code using the do-notation (among other things, I used to write "x <- return $ m" instead of "let x = m"). [snip] Why do you WANT to write concise code using the do-notation? Has someone revived the Obfuscated Haskell Contest, or do you find touch-typing difficult?
Which of the following is easier to read (and please forgive the short variable names) ?
x <- return $ m or let x = m
x <- m let (a, b) = unzip x ... -- (and this code uses an extra variable) or (a, b) <- unzip `liftM` m
Concise does not mean obfuscated. Unnecessarily inflating your code will not make it more readable. Or am I wrong ?
8898
Age (days ago)
8898
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sebastien Carlier