Thu, 21 Jan 2010 08:17:26 +0000 (UTC)

Related articles |
---|

Prefix, infix and function-call and their implications in embedded lan pengyu.ut@gmail.com (Peng Yu) (2010-01-20) |

Re: Prefix, infix and function-call and their implications in embedded gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-01-21) |

Re: Prefix, infix and function-call and their implications in embedded herron.philip@googlemail.com (Philip Herron) (2010-01-21) |

Re: Prefix, infix and function-call and their implications in embedded kkylheku@gmail.com (Kaz Kylheku) (2010-01-21) |

Re: Prefix, infix and function-call and their implications in embedded bartc@freeuk.com (bartc) (2010-01-21) |

Re: Prefix, infix and function-call and their implications in embedded monnier@iro.umontreal.ca (Stefan Monnier) (2010-01-25) |

From: | glen herrmannsfeldt <gah@ugcs.caltech.edu> |

Newsgroups: | comp.compilers |

Date: | Thu, 21 Jan 2010 08:17:26 +0000 (UTC) |

Organization: | California Institute of Technology, Pasadena |

References: | 10-01-069 |

Keywords: | syntax, design |

Posted-Date: | 21 Jan 2010 14:51:53 EST |

Peng Yu <pengyu.ut@gmail.com> wrote:

(snip)

*> 3+2*5>7*

*> (> (+ 3 (* 2 5)) 7)*

*> Greater[Plus[3,Times[2,5]],7]*

*> Apparently, at least to me, the first expression is the most readable.*

*> One possible reason is that we learn this algebraic notation much*

*> earlier than the other two, which is in analogy to that we can respond*

*> to the native language (say, English) much faster than to a second*

*> language (say, French).*

(snip)

*> [I suspect it's like underwear, you like what you're used to, and you can't*

*> really do meaningful comparisons because everyone already is familiar with*

*> something. -John]*

I remember from many years ago, the discussions on the advantages of

HP's RPN over TI's algebraic entry calculators. TI would claim that

algebraic was closer to the way people write expressions. Others

would claim that RPN is closer to the way we think about mathematical

expressions. If you always write it down before computing then, yes,

algebraic is more readable. Otherwise, when you think about problems

it is more like.

Start with three, then take two and five and multiply them,

then add that to the previous result. Compare seven to the result.

I don't know that anyone thinks in parentheses, but more usually

in terms of what to do to previously calculated results. Around

that time I knew someone with a brand new HP calculator, and I

thought I would be able to teach her about using it. It turns out,

though, that in a few minutes she was able to figure it out without

any help from me.

In the old days, even TI calculators did transcendental functions

in RPM form. I remember the fun of evaluating cos(x)=x by repeated

pressing of the COS button until the result stops changing. Now the

usual TI calculators use the prefix form for COS, making that much

more difficult.

-- glen

the previous result. Compare seven to the result.

I don't know that anyone thinks in parentheses, but more usually

in terms of what to do to previously calculated results. Around

that time I knew someone with a brand new HP calculator, and I

thought I would be able to teach her about using it. It turns out,

though, that in a few minutes she was able to figure it out without

any help from me.

In the old days, even TI calculators did transcendental functions

in RPM form. I remember the fun of evaluating cos(x)=x by repeated

pressing of the COS button until the result stops changing. Now the

usual TI calculators use the prefix form for COS, making that much

more difficult.

-- glen

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.