4 ms·
There are two issues that are really hard to articulate in a language critique: 1) There is no easy way to learn the language. Try explaining that without look
by roenxi 4y ago
There are two issues that are really hard to articulate in a language critique:
1) There is no easy way to learn the language. Try explaining that without looking ignorant.
2) The software written in this language is too hard to read and understand.
Do either of these problems manifest in Haskell? No idea. But I've seen them manifest in other systems and once I know about them suddenly there is an obvious and suspicious silence of people talking about clear problems. When a group of developers see something they don't understand they go quiet because it is hard to tell if the thing is inherently too hard or if the developer themselves just doesn't get it.
Happens a bit in the lisps, I think. There isn't any privileged syntax for loops and conditionals so there are no hints about what control flow constructs to use. People aren't about to stand up and say they don't really understand what control structures are should be used when. They'd just look silly. So the topic doesn't get a lot of discussion despite being important & people go use languages where loop statements get special syntax.
- spion 4y agoI've tried to articulate this through pointing out that the documentation culture of Haskell is lacking and indeed I've been called "willingly ignorant, and proud to state that fact publicly" IMO thats really the only remaining problem of Haskell. Most of its documentation is just plain terrible. Rust is probably more difficult to learn as a language, yet the documentation culture is so awesome that one can power through.
- kqr 4y agoA large part of this (and why you will find it hard to find Haskell developers who admit the state of the documentation is lacking) is that documentation isn't bad -- it's specifically apprentice-level documentation for specific libraries/use-cases that is bad. In other words, journeyman users who are experienced in "following the types" will find plenty of really high-quality documentation. Total novices who need an introduction to the language will also find high-quality material (though this is more of a recent development). However, once you're past the novice stage and at the apprentice level where you want to accomplish something specific using some libraries, there's nothing for you there. You have to ask someone at the next journeyman level to sit with you and guide you through following the types. That is limiting, and under-recognised, I think.
- josephcsible 4y agoBy "documentation", do you mean introductions/tutorials, or references? I'll agree the former could use some work, but I find the latter to be excellent.
- spion 4y agoI find the reference is not really great. Some of it stems from the fact that function argument names aren't really present in the documentation. Most languages that have excellent documentation will explicitly state what each argument is, something to the point of mind numbing repetitiveness. Often the documentation is written in a way that allows you to start reading anywhere and still understand everything, which is less common with Haskell
- klodolph 4y ago> Do either of these problems manifest in Haskell? Haskell code varies a ton. Some people write simple, straightforward stuff in Haskell with lots of pure functions and relatively simple types, straightforward definitions. Some people invent complicated type systems for their app. Some use weird styles, like points free, or continuation passing. Some will rely heavily on abstractions like monads, applicative functors, arrows, zippers, lenses, unfolding, etc. Some write straight imperative code. Highly variable.
- threatofrain 4y agoIs point free that weird? JS pipes are in the proposition process. Data → Process → Process → Process Is the above unclear?
- kqr 4y agoNot in simple cases. It can get weird very quick though. If I didn't know the intuition behind `(.) . (.)` I would have trouble deciphering it mentally, and would have to derive it with pencil and paper.
- klodolph 4y agoThat’s not really what I’m referring to. There’s actually a tool in Haskell that can rewrite code into a points free style, and it can handle much more complicated cases than just simple composition, it can handle multiple uses of a variable, it can eliminate multiple variables, etc. you can create some real incomprehensible stuff this way. Edit: Here's a Haskell wiki article: https://wiki.haskell.org/Pointfree https://wiki.haskell.org/Pointfree > Point-free style can (clearly) lead to Obfuscation when used unwisely. As higher-order functions are chained together, it can become harder to mentally infer the types of expressions. The mental cues to an expression's type (explicit function arguments, and the number of arguments) go missing. > Point-free style often times leads to code which is difficult to modify. A function written in a pointfree style may have to be radically changed to make minor changes in functionality. This is because the function becomes more complicated than a composition of lambdas and other functions, and compositions must be changed to application for a pointful function. > Perhaps these are why pointfree style is sometimes (often?) referred to as pointless style. I have observed some relatively extreme examples of pointfree in the wild, and that's what I'm referring to.