27 ms·
I don't think ML has the `where` clause. Haskell got it from Miranda, which got it from SASL, which got it from ISWIM.
by undecidabot 8y ago
I don't think ML has the `where` clause. Haskell got it from Miranda, which got it from SASL, which got it from ISWIM.
- pjmlp 8y agoRight. I always think that let ... in ... can also use where. My mistake.
- groovy2shoes 8y agoThe original ML language (the one produced as part of the LCF theorem prover), did have a `where` clause that works like the one in Haskell. See here for example: https://github.com/theoremprover-museum/LCF77/blob/master/src/files.ml#L76 https://github.com/theoremprover-museum/LCF77/blob/master/sr... A brief skim over the revised definition of Standard ML indicates that it was abandoned at some point. I've no idea if Caml or OCaml kept it. That said, I'm reasonably sure that the syntactic construct (insofar is it is used in programming languages) originated with the ISWIM introduced in this paper, which was rather influential in its day, perhaps especially in the functional programming community.