Re: String concatenation design



andy@xxxxxxxxxxxxxxxxxxxxxxxxx wrote:
Rob Thorpe wrote:

Don't do what C, C++ and Perl do, and have 15 levels with slightly
different priorities. These languages are popular but their precendence
levels aren't.

What evidence is there to support your claim that the precedence levels
are unpopular?

From the Indhill style guide:
"Since C has some unexpected precedence rules, expressions involving
mixed operators should be parenthesized." & later "There is a time and
place for the binary comma operator, but generally it should be
avoided."

The GNU style guide is milder:
"Instead, use extra parentheses so that the indentation [of
expressions] shows the nesting:"

Plus I've never read a program of any length that used many of the
precedence levels at once. And most programs I've read seems to ignore
many of them, often relying on * . -> + - * / && || = == only.

Think about this: can you remember what they all are? For C and C++?

.



Relevant Pages

  • Re: String concatenation design
    ... These languages are popular but their precendence ... What evidence is there to support your claim that the precedence levels ... use extra parentheses so that the indentation [of ...
    (comp.programming)
  • Re: String concatenation design
    ... What evidence is there to support your claim that the precedence levels ... are unpopular? ... The GNU style guide is milder: ... expressions] shows the nesting:" ...
    (comp.programming)