News for hackers. Stuff that matters.
Re:Comparison of Haskell and Julia List Comprehensions by jolmg on Wednesday July 07, 2021 @01:41PM (#27763777)
> Also Haskell gets the order of ‘<-‘ clauses wrong, so probably mine is a minority opinion.

That's probably so it's more in-line with do-notation:

  [x | xs <- xss, x <- xs]
is the same as:

  do { xs <- xss; x <- xs; return x }
Maybe writing statements backwards was deemed more confusing.

Personally, I don't really use list comprehension syntax, but maybe I would if they were backwards like you describe. It would make more sense with the position of the return value being to the left.

There are no comments on this comment yet.