The “let bindings in expression” originates in mathematics and logic. I cannot speak for the original proposal but the major difference between this syntax is that it evaluates to an expression compared to the let statement which evaluates to undefined.
One benefit of “let in” is that it is easier to compose with other syntactic constructs which expect an expression. The semantics of the “let bindings in expression” is to evaluate the expression after “in” with variables substituted by the definitions in the bindings. Essentially, the syntax allows you to create a modified scope for that one expression. However, I find nested let expressions difficult to parse in my head and would personally not suggest this syntax to be added to the language. I use Haskell as my main programming language and there using the “where” syntax often leads to easier to read code than using “let … in”. 2018年8月24日(金) 17:41 Darien Valentine <[email protected]>: > Herby, for those like myself who aren’t familiar with “classical let-in,” > could you explain more about the objective? It’s not clear to me from the > brief example what advantages this would provide. > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

