Hi Jack - this question comes up so often I've started a couple of Wiki pages addressing it.
Take a look at http://www.jsoftware.com/jwiki/NYCJUG/notationFAQ for an argument why right-to-left execution is more useful than the reverse. Hint: it becomes an issue only when you start thinking about arrays as basic objects and how you apply functions across them. Also, I've started a page to address the fallacy of thinking that there is such a thing as a "standard mathematical notation": http://www.jsoftware.com/jwiki/NYCJUG/MathematicalNotation . John Randall has had a lot to say about this at J meetings - he especially recommends a book by Cajori to get an historical perspective on this - but I don't think either of us have written up anything on these discussions. Finally, an essay about why this is an important issue - http://www.jsoftware.com/jwiki/Essays/Notation_as_a_Tool_of_Thought - at least if you want to improve your ability to deal with certain kinds of abstractions. Hope these help you understand why this particular choice has been made in J. Regards, Devon On 6/27/08, Jack Andrews <[EMAIL PROTECTED]> wrote: > > hi guys, > > i was pondering the benefits pros and cons of a left to right > notation. common calculators go left to right - 1 + 2 * 3 is 9. is > the fact that common calculators operate this way due to "common > sense" or an innate intuitiveness? > > so ordinary J: > > q=. 2 3 5 7 9 > > 1 + 2 * q > 5 7 11 15 19 > > > then a left to right J could be: > > 2 3 5 7 9 =. q > > q * 2 + 1 > 5 7 11 15 19 > > > =. q may be the most offputting here, but this is just how a common > calculator works -- the "M+" key. > > ta, jack > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
