silly question: prefix vs postfix ops

MattR <rosing@peakfive.com>
Mon, 3 Mar 2008 10:37:52 -0800 (PST)

          From comp.compilers

Related articles
silly question: prefix vs postfix ops rosing@peakfive.com (MattR) (2008-03-03)
Re: silly question: prefix vs postfix ops csaavedra@alumnos.utalca.cl (Claudio Saavedra) (2008-03-03)
Re: silly question: prefix vs postfix ops mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-03-03)
Re: silly question: prefix vs postfix ops gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-03-03)
Re: silly question: prefix vs postfix ops haberg_20080207@math.su.se (Hans Aberg) (2008-03-03)
Re: silly question: prefix vs postfix ops marcov@stack.nl (Marco van de Voort) (2008-03-03)
Re: silly question: prefix vs postfix ops gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-03-04)
[20 later articles]
| List of all articles for this month |

From: MattR <rosing@peakfive.com>
Newsgroups: comp.compilers
Date: Mon, 3 Mar 2008 10:37:52 -0800 (PST)
Organization: Compilers Central
Keywords: design, question, comment
Posted-Date: 03 Mar 2008 13:59:06 EST

This is more of a language question than a compiler question (and
therefore should create a religious battle :) ), but I'm wondering if
the answer has more to do with the compiler. Anyway, why are there
prefix operators that could just as well be postfix? Why is it !a and
not a!, or *a and not a* ? I can understand the increment and
decrement operators, and the & op but expressions like *a[i] would be
a lot clearer if it were a[i]*, just read the operators from right to
left. Is it a case of, well, it's always been done this way?


[We've always done it that way. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.