I'm reading The implementation of functional programming languages (1987) by Peyton Jones and he mentions (p.307) that the MKAP (make application) instruction is more convenient if the argument is pushed first, followed by the function, and then MKAP. So for example if f x y
was being compiled, the G-code would be
PUSH y
PUSH x
PUSH f
MKAP
MKAP
rather than the more natural order of pushing the function first, then the argument:
PUSH f
PUSH x
MKAP
PUSH y
MKAP
The second order appears more intuitive because it follows a left-to-right application order. However, Peyton Jones states that the first order is more convenient. He says this will be shown later in the book but I can't find his reasoning anywhere.
What are the concrete advantages of the argument-first order for MKAP?