3 ms·
There's definitely a vein of deliberate unreadability. Types and parameters are often labelled positionally instead of given meaningful names. For example the g
by millstone 7y ago
There's definitely a vein of deliberate unreadability. Types and parameters are often labelled positionally instead of given meaningful names. For example the graph library fgl uses typenames 'a' and 'b' instead of useful names like 'NodeLabel' and 'EdgeLabel'.
- monoideism 7y agoOK, 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.