Re: [cowiki-dev] Text Formatting

PAUL HANCHETT <[email protected]>
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <[email protected]>
As everyone should be *painfully* aware by now, I am not a fan of "code 
must be formatted *exactly* this way".  This is largely because my own 
preferred style is unlike any other I've found.  (No one here has seen 
me use it, I've been trying to learn indenting the "PHP" way...)

However, lest anyone misunderstand, I think code should be readable as 
presented in the file.  This means, whatever indenting and commenting 
style you may use is OK as long as it is ***EASILY*** understood by others!

All of the editors I use have code re-formatters, and do I use them when 
I need to.  I try to adopt the visual style of the original author of 
the file where I can.  I think it's poor form to change the format of 
every file I touch, so I don't do it.  If I find a file that is poorly 
formatted, I fix it for whoever follows after me.

I prefer to use real tabs for indenting code.  The reason is that 
different programmers like different amounts of space-- anywhere from 
one to eight(!).  If tabs were used for indenting then I already have 
the tab stops set for the four spaces that I prefer. YMMV.  If spaces 
and tabs get mixed it can be quite annoying.  Entab and detab can fix 
this if you can identify the indent in use.  If not, use the editor's 
formatter with my blessing!

That old 80 character limit used to have more to do with the size of 
terminals than anything else.  I think its time has passed...  HOWEVER, 
a line *surely* can get too long!  My personal limit is in the region of 
120 characters.  :-)  The real goal is to be easily readable in a nice 
sized window!

That said,  there is no reason to change things gratuitously.   :-)   
Use good judgment!

Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.