3 ms·
Exercise 4.1 in SICP [1] asks for an implementation that evaluates operands from right to left. :) Other than that, I don't know of any implementations that do
by pg314 9y ago
Exercise 4.1 in SICP [1] asks for an implementation that evaluates operands from right to left. :)
Other than that, I don't know of any implementations that do. I also don't know of any implementations that guarantee left to right order. Many manuals specifically mention not to rely on the order of evaluation (e.g. Chez Scheme). Since I try to avoid depending on unspecified behavior if I can avoid it, I might not notice when an implementation uses a different evaluation order.
I would expect one of the optimising compilers (MIT Scheme, Chez Scheme, Stalin) to be your best bet to find a real implementation with non-left-to-right order. And it might require a specific set of circumstances to trigger, so trivial examples might work ok.
And of course, just because current implementations use left to right order, doesn't mean that that can't change in the future.
[1] https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1 https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.htm...