Eclipse is very nice, but :(...

Hans Fugal hans at fugal.net
Tue Jun 20 12:44:23 MDT 2006


On Mon, 19 Jun 2006 at 16:43 -0600, Gregory Hill wrote:
> I've tried doing 4-space, and 2-space tabs, spaces instead of tabs, etc.
> I think I'm going to go back to tab characters.  It makes the file
> smaller, and whoever reads the code can see it however they want to see
> it by setting their own tab-stops.  I never understood why people are so

Fine, if you're using 8-space tabs. If you're using n-space tabs where
n<8 then do us all a favor and expand your tabs. Or at least check for
alignment and 80-columns with 8-space tabs. The problem here is not just
us 8-space fanatics, but whenever you try to cat, print, less, or
anything else that isn't superconfigured for your tab preference. I
really hate printing something that ends up with a gazillion wrapped
lines just because the guy who otherwise fit everything in 80 columns
decided to use tabs when he really should have used 4 spaces. 

Any decent editor makes it easy to type tab and get 4 spaces (and
likewise to type backspace and back up 4 spaces). But there are a lot of
programs that will translate tab into 8 characters. 

Let's just use occam's razor and keep it simple, folks. Tabs are 8
spaces. If you want something else, use spaces. 


While I'm here I might as well weigh in on the rest of the opinions. :)
I like 4 spaces in C-like languages, 2 spaces in ruby or XML. I don't
buy the "8-space tabs in C if you can't read it you're an idiot
programmer" argument, and I really don't buy it for C++ or Java or
anything else where you might have a gratuitous indentation level from
being inside a class or whatnot. I find that frequently it takes nearly
60 characters to write a decent line of code using some APIs or
well-named variables, and breaking lines is almost always less readable
than not breaking them, so 8-space indentation makes a real mess sooner
rather than later. I do believe in keeping it to 80 chars per line
because of the printing and cat/less usage previously mentioned, and
because I think it's generally more readable (even if you do have to
split uberlong lines).

-- 
Hans Fugal ; http://hans.fugal.net
 
There's nothing remarkable about it. All one has to do is hit the 
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20060620/a0aca0eb/attachment.bin 


More information about the PLUG mailing list