4 ms·
Haskell is a bit of the odd man out in terms of syntax for type annotations. Scala, OCaml, Agda, Idris, Elm all use single colon. I'm actually unsure why Haskel
by whateveracct 11y ago
Haskell is a bit of the odd man out in terms of syntax for type annotations. Scala, OCaml, Agda, Idris, Elm all use single colon. I'm actually unsure why Haskell is the way it is.
- hollerith 11y agoHaskell's designers wanted single colon for the cons operator, and the cons operator is legal on the left-hand side of an "equation" (sorry, don't recall the official terminology) because Haskell allows pattern matching there. (I'm not saying I agree with the decision.)
- gleenn 11y agoRuby...