4 ms·
Python whitespace bites me every once in a while. But this does not generalize to other languages, in particular, I prefer writing Haskell with whitespace sensi
by marcosdumay 5y ago
Python whitespace bites me every once in a while. But this does not generalize to other languages, in particular, I prefer writing Haskell with whitespace sensitivity¹ and I don't remember it ever being a problem.
1 - Last time I asked "who doesn't" on the internet, I found somebody who doesn't. But it's by far the most popular option.
- eatonphil 5y agoTrue. Languages with static type checking probably have this easier because you'll have some warnings about differences in scopes or unused variables.
- marcosdumay 5y agoIt's not that. The whitespace works differently between those languages. The Python syntax has limitations that aren't on the Haskell one. But also, Haskell tends to place the kind of things the GP is talking about on the beginning of your expression (because of the "reverse" order on function composition), while Python tends to place them at the end of a block.
- elcritch 5y agoSimilar benefit in Nim where types help catch stray indent issues. Plus proper scoping of automatic variables in ‘for’ loops helps too.