Premise: Source code is easier to read and understand when a module’s functions are ordered from high-level (what the module does) to low-level (the implementation details). It would be nice if a function with a
let expression could be organised the same way.
In Elm, as in other ML languages, you can declare a set of locally-scoped functions that are available as helpers to evaluate an expression:
three = let one = 1 two = 2 in one + two -- 3
This function might be easier to read and understand if it could be written like this:
three = in one + two let one = 1 two = 2
To me this is clearly better, but I bet there are many who would disagree.
I’d be curious to hear what @evancz and any other experienced language designers reading this thought.