Banjo

52 thoughts
last posted Nov. 9, 2015, 7:13 p.m.

8 earlier thoughts

0

Evaluation Order

I think it's a good idea to keep evaluation order in top-down left-to-right order; that is, when checking what the definition of something is, one need only look up and to the left, not to the right or downwards.

Obviously with loops, recursion, and function calls this doesn't always make sense.

Obvious counter-examples of this are python's x if y else z where y has to be checked first, and Haskell's x+y where x = 10, y=5 which has the variable definitions coming after their use.

One common exception to the left-to-right rule is assignment - the variable to assign to is put on the left side even though it is the last term to be used. This exception is worthwhile, though, as people are more likely to be "scanning" the left column for a definition than a use of something.

43 later thoughts