4 ms·
As a long time programmer, this gives an insight into why I avoid Haskell. Syntax matters, in part because it has such an influence on style. When I look at
by CharlesMerriam2 13y ago
As a long time programmer, this gives an insight into why I avoid Haskell. Syntax matters, in part because it has such an influence on style. When I look at the code, I can't read it. There seem to be poor choices on choosingcasesformultiplewords that dependOnContext but are still unreadable.
I can't help feeling that the reserved terms, such as Functor, Applicative, F, and liftF bring the chaos to the thinking process that is reflected in the article. I skimmed it, tried to read it, and still have no idea what the person was even trying to do.
This is a language that discourages clarity.
- awj 13y agoWhere are you seeing any discrepancies from camelCase? The only thing I see is that types and constructors (i.e. Functor/Applicative/F) start with capital letters. Also, to be frank, many languages give a false sense of knowledge portability. "As a long time programmer" may not carry you so far into Haskell (or Prolog, or Forth) unless you've seen something else in their paradigms.
- freyrs3 13y ago> Also, to be frank, many languages give a false sense of knowledge portability. This is true, there's a very common psychological bias that people experienced in one domain when encountering a new subject which they find difficult will sometimes blame the new subject matter as flawed or overly complicated instead of realizing the limitations of their own knowledge.
- eru 13y agoFunctor, Applicative, F and liftF are not reserved terms. What makes you think so? They are user defined (or in this case, library defined).
- freyrs3 13y ago> I skimmed it, tried to read it, and still have no idea what the person was even trying to do. The fact that you haven't learned enough Haskell to understand the article after skimming it doesn't make Haskell problematic.
- vivaforever 13y ago> learned enough Haskell it seems you can never learn enough Haskell, at least in the first few years.
- chowells 13y agoExactly! Syntax matters! Haskell's syntax is radically different because it matters that it is. It's not different to obfuscate or be obstructionist. It's different because it's better, for the features of the language. Function application via whitespace is a key feature to make automatic currying pleasant. Automatic currying is a key feature to make partial application pleasant. The patterns continue. Haskell's syntax wasn't chosen by throwing darts at a dartboard. It wasn't chosen to upset C programmers. It was chosen to optimize simplicity and clarity of code that uses the language. It missed the mark occasionally, but overall it did a good job. Syntax does matter, and Haskell is proof that using higher levels of abstraction benefits greatly from syntax that encourages it.
- eru 13y agoHistorically, most of Haskell's syntax was chosen to be similar to other functional languages existing at the time. I don't know where ML---the grandsire of Haskell's family of languages---got its syntax from in the first place.