Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: operator precedence, just curious...

From: ryanc:iesco-dms at: 5-Oct-2001 12:36

Hey Tom, I actually like the REBOL way better myself, but I have never liked operator precedence rules either. My guess is that RT figured operator precedence interfered with the interpreters design too much. Instead they compromised on the op type. Where most functions in rebol take thier arguments subsequently, op types take an argument from the previous word, as well as the following word. The result is a left to right evaluated equation, or as one might say "no precedence", though I am sure Joel has a more appropriate term for this. : ) I like it no precedence becuase it works exactly like how you would enter it into a calculator. so the expression:
>> 6 * 7 - 3 / 4
is computed (((6 * 7) - 3) / 4) or just as if you typed "6 * 7 - 3 / 4" into a calculator. If you still miss those operator precedence rules, somebody did write a dialect that does it, I am sure its easy to find. --Ryan Tom Foster wrote:
> Hi guys, > > Whats up with this? I'm just curious, and probably missing > something simple... > > REBOL/Core 2.5.0.4.2 23-Mar-2001 > Copyright 2000-2001 REBOL Technologies. All rights reserved. > REBOL >>> 6 * 7 - 3 / 4 > == 9.75 > > Python 1.5.2 (#0, Dec 27 2000, 13:59:38) [GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam > >>> 6 * 7 - 3 / 4 > 42 > > -- > > signature sneezing: "achoo!" > -tom > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400