3 ms·
Am I the only one who found the "ad-hoc" solutions more clear? I appreciate that they make it obvious to the reader which things are loops, which are null-chec
by rattray 9y ago
Am I the only one who found the "ad-hoc" solutions more clear?
I appreciate that they make it obvious to the reader which things are loops, which are null-checking, which are async, etc.
I'm sure the unified do-notation is very satisfying to write, but it seems confusing to read.
- jimbokun 9y agoOne of the few empirically findings of programmer productivity, is that programmers can produce about the same number of working lines of code per day regardless of the language. And the ratio of bugs / lines of code is relatively constant across languages. So expressing the exact same behavior in fewer lines of code directly leads to higher productivity, and fewer bugs for equivalent functionality. In other words, there is a concrete cost associated with overly verbose programming language constructs.
- rattray 9y agosource? If that's actually true, we should all be using CoffeeScript: http://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/ http://redmonk.com/dberkholz/2013/03/25/programming-language... According to that analysis, it's more expressive than Haskell, Scala or Clojure (all of which otherwise rate quite well). Regardless, the "ad-hoc" solutions are all about the same LOC as the do-notation syntax, so I'm not sure the LOC argument is relevant here. I would assert that bugginess and readability vary across coding styles, which is ultimately the question at hand, not language (ie; you can write comprehensions in Haskell too).