Re: Prefix, infix and function-call and their implications in embedded language readability

Stefan Monnier <monnier@iro.umontreal.ca>
Mon, 25 Jan 2010 12:31:06 -0500

          From comp.compilers

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)
| List of all articles for this month |

From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: comp.compilers
Date: Mon, 25 Jan 2010 12:31:06 -0500
Organization: Compilers Central
References: 10-01-069 10-01-076
Keywords: syntax, design

> So what happens with operator precedence is that when the number of
> meanings we want to use exceeds the number of operators, we can't
> invent new operators, so we start overloading the meanings of the
> existing ones: a + b adds strings together, or performs set union,
> etc. In math is not so bad because in math you can invent new glyphs,
> make use of different typefaces and alphabets, and make use of two
> dimensions, etc. If you want some different kind of plus, you can put
> a circle or box around the plus symbol and there you go: new glyph.


Actually, in several more recent programming languages, the source
charset is Unicode, so while you still can't "make use of different
typefaces and alphabets, and make use of two dimensions, etc", and you
can't "invent new symbols" you have amny more pre-invented symbols to
choose from.


In my experience, infix is great but only for those operators for which
the readers already have a previous knowledge (such as +/-/=/</... from
arithmetic, or whatever other mathematical notations for other fields).




                Stefan


Post a followup to this message

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