[Haskell-cafe] Language complexity & beginners
Geraldus
heraldhoi at gmail.com
Tue Feb 9 11:48:59 UTC 2016
As for me, I don't like ubiquitous $ everywhere, often I prefer parentheses
over $ (this might be due to my Elisp practices), and I like very much dot
style.
Most uses of "$" are for stupid
things like "sin $ 1 + 2" where parentheses would be much more clear.
Agree.
"$" simplifies visual perception through two factors:
I think this does not hold for every single person.
1. we are relieved from counting parentheses
This is not big deal if your editor/IDE can highlight parentheses and even
better provide commands to jump to opening/closing parenthesis.
foo (thInt $ fromIntegral $ c2hsValueInt cexp) (thInt $ fromIntegral $
c2hsValueInt cexp)
foo (thInt (fromIntegral (c2hsValueInt cexp))) (thInt (fromIntegral
(c2hsValueInt cexp)))
Me, I get a blood pressure spike roughy here ---^
Personally, I find hard to read expressions like:
someFn $ someOtherFn $ more $ more $ val
(someFn . someOtherFn . more . more $ val)
seems better for me, but this is also good:
someFn (someOtherFn (more (more val)))
Parentheses annoys me only when I need to wrap something by parentheses in
Emacs with electric-pairs-mode :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160209/8519c86d/attachment.html>
More information about the Haskell-Cafe
mailing list