--u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 23, 2009 at 09:48:44PM +0900, Eleanor McHugh wrote: > On 23 Feb 2009, at 12:38, Chad Perrin wrote: > >On Mon, Feb 23, 2009 at 01:09:34AM +0900, Ken Bloom wrote: > >> > >>"There are no precedence rules applied to operators, they are simply > >>evaluated from left to right. Operator precedence is explicity > >>applied > >>with the use of parenthetical expressions. The following example > >>demonstrates explicit operator precedence." > >> > >>Looks like a cross between Ruby and INTERCAL. When > >>1.0+2.0/3.0+4.0=5.0, > >>that's not a good thing, and will confuse most mathemeticians to no > >>end. > >>And the use of ^ for assignment will also be very unintuitive. > > > >This is why I tend to think that positional precedence should always > >use > >named functions (or methods or whatever) instead of traditional > >mathematical sigils, and use either prefix or postfix notation. For > >instance: > > > > sum( quotient( sum( 1.0, 2.0 ), 3.0 ), 4.0 ) > > > >. . . or as UCBLogo would put it: > > > > sum quotient sum 1.0 2.0 3.0 4.0 > > > how about: > > 1 2 + 3 / 4 + > > I always liked Forth's RPN simplicity :) I don't much like combining postfix notation with right-to-left evaluation. I tend to think that the notation should "precede" the operands in the direction in which operations are evaluated. Of course, that's more a matter of familiarity and comfort for me than any kind of objective criteria (other than consistency with traditional function notation), but it's how I feel. In other words, if the operator notation is going to be placed to the right of the operands, I'd prefer operands be evaluated right-to-left. Of course, I don't think *anyone* would like the way that would look, so that pretty much breaks down to preferring prefix notation over postfix notation. -- Chad Perrin [ content licensed OWL: http://owl.apotheon.org ] Quoth Bill McKibben: "The laws of Congress and the laws of physics have grown increasingly divergent, and the laws of physics are not likely to yield." --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkmi/PoACgkQ9mn/Pj01uKU0UgCgxFO64fChvzo6cFa8yCf0j6nO XRgAn3P7V3Oge9i024m4b5WU7Hj7KZVX -by -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--