News for hackers. Stuff that matters.
Re:The Next 700 Programming Languages (1965) [pdf] by remcob on Monday January 08, 2018 @06:11PM (#16101787)
First example:

  x(x - k a)

  where x = b + 2c
Now imagine ‘+’ and ‘-’ have side-effects, like a log message. What would the output be? ‘+-’, ‘++-’ or ‘+-+’? Certainly not the ‘-+’ order as they appear in the code, which is causally impossible.

The paper restricts to pure functions, where this is not an issue. But it does seem to violate a widely followed implicit rule that lines of code are in strict causal order, with well-defined explicit exceptions for control flow.

Re:The Next 700 Programming Languages (1965) [pdf] by theoh on Monday January 08, 2018 @06:54PM (#16102132)
I'm not sure "violate" is the right word, given Landin's objectives.

If the where-clause offends you, use a let-clause instead?

Re:The Next 700 Programming Languages (1965) [pdf] by abiox on Tuesday January 09, 2018 @08:08PM (#16111740)
this already happens: in a variety of languages, x could just be an ordinary function with the body defined below any given usage. here, `where` could be replaced with a standard function definition, and it's `+` would still be textually below the usage's `-`.