Re: String concatenation design
- From: andy@xxxxxxxxxxxxxxxxxxxxxxxxx
- Date: 30 Mar 2006 07:33:06 -0800
Rob Thorpe wrote:
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."
"some" is not the same as all.
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++?
If they were changed I would be extremely annoyed because I would have
even less chance of remembering what they are. AFAIK a good subset is
the same across a wide number of languages too. That helps when
learning a new language. Hands off operator precedence! Thats what I
say.
cheers
Andy Little
.
- Follow-Ups:
- Re: String concatenation design
- From: Oliver Wong
- Re: String concatenation design
- References:
- String concatenation design
- From: Anton Treuenfels
- Re: String concatenation design
- From: Rob Thorpe
- Re: String concatenation design
- From: Oliver Wong
- Re: String concatenation design
- From: Rob Thorpe
- Re: String concatenation design
- From: andy
- Re: String concatenation design
- From: Rob Thorpe
- String concatenation design
- Prev by Date: Re: String concatenation design
- Next by Date: Re: String concatenation design
- Previous by thread: Re: String concatenation design
- Next by thread: Re: String concatenation design
- Index(es):
Relevant Pages
|