[prog] C and curly braces - question of style?

Jimen Ching jching at flex.com
Mon Aug 23 11:01:11 EST 2004


On Sun, 22 Aug 2004, Akkana Peck wrote:
>I dislike code indented with tabs.  Why?  Because if I print it
>on a printer, or view it in a normal terminal, tabs display as
>eight spaces and the code becomes hard to read (and probably
>doesn't fit in 80 columns any more, so the ends of lines either
>wrap or disappear).

Are there a lot of people printing out source code?  I haven't printed
source code for over 5 years.  The last time I touch hardcopy source code
was during a code review with EE's.  Even then, I thought it was strange.
But I can understand from the point of view of an EE, since when they
review their circuits, they print out their schematic capture diagrams.

What do people do with hardcopy source code?

As for 80 column terminals and tabs, if your pager doesn't support setting
the tab width, I recommend 'less'.  Most terminal editors (including vi),
allow setting the tab width.  So it shouldn't matter what the tab size is.

Having good tools eliminate the need for all these style rules...

--jc
-- 
Jimen Ching (WH6BRR)      jching at flex.com     wh6brr at uhm.ampr.org


More information about the Programming mailing list