4 ms·
OK, those are poor stylistic practices, but they’re orthogonal to point-free style.
by monoideism 7y ago
OK, those are poor stylistic practices, but they’re orthogonal to point-free style.
- edflsafoiewq 7y agoIt is related. In point-free style the "omitted" parameters have to be distinguished positionally; they have no names at all, not even 'a' or 'b'.
- nmca 7y ago^^^^^ This is extremely insightful, and now ranks as the most accurate and succinct explanation I've seen of why point-free is terrible.
- monoideism 7y agoIt's not extremely insightful. It's literally the definition of point-free style. Also, Haskell doesn't have labeled/keyword function parameters, regardless of whether or not you use point-free style. Sometimes, people pass in a record to achieve a similar effect, but in general, passing in a ton of parameters goes against idiomatic Haskell style.
- monoideism 7y ago> In point-free style the "omitted" parameters have to be distinguished positionally; they have no names at all, not even 'a' or 'b Yes, that's literally the definition of point-free style. I was referring to labeling function parameters `a` and `b`. Also, when I checked, that's actually not what the FGL library does. It labels type parameters with `a` and `b`. Labeling generics and type parameters with letters of the alphabet is pretty typical for a wide range of languages (ie, `T` in Java, etc.). Arguably, it's a bad idea, but it's by no means unique to Haskell.