Order of operations in mathematics is not usually a big deal, since it is parsed by humans, and depends very much on context.
For computer languages, it is different. We want rules that are unambiguous and parsable by humans and computers reasonably efficiently. A language like J has many operators, and their associativity, valence and precedence must be straightforward. I think the current ones are very reasonable after you have had some experience. For comparison, see http://www.cppreference.com/operator_precedence.html and try to reproduce it after 5 minutes' study. Best wishes, John Devon McCormick wrote: > Not someone who knows J or APL. > > Many of us who do have noticed how clumsy and non-extensible traditonal > order-of-operations mathematics is. > > On 3/21/06, p j <[EMAIL PROTECTED]> wrote: >> >> What would you expect the programmer intended in the >> following? >> 4*3 + 2*3 -1 >> >> Almost everyone would say: 12 + 6 - 1 > > -- > Devon McCormick > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
