3 ms·
do notation sugars free variables which leads to more confusion and more complexity. It may not be idiomatic, but I avoid do notation for this reason. It's almo
by crimsonalucard 9y ago
do notation sugars free variables which leads to more confusion and more complexity. It may not be idiomatic, but I avoid do notation for this reason. It's almost a backwards abstraction... if the functional style is really better... why create syntactical sugar to make haskell seem imperative?
You guys are right on traverse or mapM though.
- yawaramin 9y agoYes, we have to walk a fine line here. The fact that do notation desugars to function calls in a complete deterministic way is nevertheless not easy to explain to learners. It's a judgement call but overall its benefits outweigh the drawbacks--IMO.