Re: Braces or not [Re: cat]
- From: "Herbert Rosenau" <os2guy@xxxxxxxxxxxxx>
- Date: Sun, 9 Mar 2008 11:08:32 +0000 (UTC)
On Thu, 6 Mar 2008 08:38:09 UTC, Micah Cowan <micah@xxxxxxxxxxxxxxxx>
wrote:
Richard Heathfield <rjh@xxxxxxxxxxxxxxx> writes:Uh, a halfways intelligent editor will help in writing/editing source.
If that's what you mean, then my answer is:
- It's not appreciably harder to add braces later than it is to put
them in in the first place.
Agreed. BUT - it is appreciably harder to remember to add them later on
special occasions than to put them in every time as a matter of habit.
Hm. I haven't found it to be so.
while (c)
c=do_it(c);
c=do_another_thing(c);
looks too broken right away for me not to notice it (though, perhaps
now that I'm doing more Python coding work these days, that may
change?).
I used to actually always put the braces in. I've fallen out of that
practice, just because I find it slightly more readable without, for
one-line bodies.
So my editor is set up expanding 'while' to
while (_) {
}
setting the cursor at the position represented by the underline
charater. Leaving the condition with TAB will insert an empty line,
placing the cursor in the new linedirectly under the 'l' from while,
so new indent is done, ready to type. Enter will insert a new line,
holding the same indent. Shift Enter in insert mode will insert a new
line under the closing bracket and the cursor under it.
Equivalence is given for do, for an so on magically. So conditional
blocks are magically written, indending is done automatically.
The behavior of enter, TAB and opening brace characters changes
depending on the insert|override mode, Enter, shift enter, Ctrl Enter
and Alöt Enter have different mode too. So typing a new program gets
easy, edit it too.
So leaving a block off from typing is at least more hard than having
it already. Indent is set magically, so misleading gets harder having
it right.
--
Tschau/Bye
Herbert
Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
.
- References:
- cat
- From: Jag
- Re: cat
- From: CBFalconer
- Re: cat
- From: Micah Cowan
- Re: cat
- From: Richard
- Braces or not [Re: cat]
- From: Micah Cowan
- Re: Braces or not [Re: cat]
- From: Richard Heathfield
- Re: Braces or not [Re: cat]
- From: Micah Cowan
- cat
- Prev by Date: Re: OK folks, corrected
- Next by Date: Re: Looking for a book about C with special criteria
- Previous by thread: Re: Braces or not [Re: cat]
- Next by thread: Re: Braces or not [Re: cat]
- Index(es):
Relevant Pages
|