Hacker News new | ask | show | jobs
by undecidabot 2877 days 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.
1 comments

Right.

I always think that let ... in ... can also use where. My mistake.

The 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/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.