On 3/04/21 5:07 pm, John wrote:
This fails when it's like b*((x*2^(3-a))-(7*c)), since
you now have to look back and forth and get a handle on what each of
the terms is.  b x 2 3 a - ** * 7 c * - * is pretty much a set of
steps (3 - a, raise 2 to that, multiply x by that, multiply 7 by c and
subtract from the former results, multiply all that by b).

Seems to me you're looking back and forth just as much here.
You're starting somewhere in the middle (how did you know to
start there?) then looking left for the 2 and right for the **,
then left for the x and right for the *, etc. etc. etc.

The fact that you have to mentally follow a set of steps is
a *disadvantage* of RPN for me. I can look at b*((x*2^(3-a))-(7*c))
and just *see* various things about it. For example, I can see
that 2 is raised to the power 3-a. I can see that b is multiplying
everything else. None of those things are obvious at a glance to
me from the RPN.

Sure, I can figure it all out, but it takes work, and I'm not
confident that I haven't made a mistake. Which means I'd much
rather audit an infix expression than an RPN one.

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SHKTCOYDYDSXFKDHXWXQ647UKA5VFK4O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to