Re: String concatenation design
- From: "Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx>
- Date: 30 Mar 2006 07:38:12 -0800
Ben Pfaff wrote:
"Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx> writes:
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?
The GNU style guide is milder:
"Instead, use extra parentheses so that the indentation [of
expressions] shows the nesting:"
That's not a general dictum. It's specifically in reference to
splitting a long expression into multiple lines.
For the GNU style you're right.
I'd point out also though that the GNU style recommends the use of
Emacs. Emacs C-mode makes writing long conditional expressions easier,
because it gets their indentation more often correct than other
editors. The point it makes here is in order to improve indentation of
expressions though, showing that their handling isn't perfect.
Relying on this in C & C++ programs in general is difficult though,
since C programmers tend to like using simple editors.
I first came across this problem when I wrote a module of a C program
with several relatively complex expressions that used many precedence
levels. The other programmer working on it complained because he
couldn't understand them, partly because the editor he was using
couldn't indent them.
.
- 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
- Re: String concatenation design
- From: Ben Pfaff
- String concatenation design
- Prev by Date: Re: String concatenation design
- Next by Date: Re: Recursive Question
- Previous by thread: Re: String concatenation design
- Next by thread: Re: String concatenation design
- Index(es):
Relevant Pages
|