Duncan Gibson wrote:
> Would it be possible to set up an svn-commit-hook to reject files
> that contain tabs? Or even to run indent...

        I don't think tabs are bad, just don't tell your editors to
        define tabs to be something else -- that's where the evil starts.

        Me personally I use the autoindent feature of my editor to handle
        indenting, and it will use tabs/spaces correctly. When I hit 'Tab'
        I get a real tab. When I want 4 space or two space indent,
        I type them as spaces, and let the editor's autoindent handle
        indenting the rest of the lines every time I hit return, so I don't
        have to keep typing spaces to get my indenting.

        But one thing I'll never do ever is set my tabstop to something like
        '4' or '2', that's just evil badness. (ie. telling the editor to 
interpret
        tabs differently than the 8 position defaults)

        The only time I ever do that is just to look at someone else's code
        where they had their tabstops set wrong (ie. to something other than 8)

        I think maybe Microsoft's IDE has some nutty default where 'tab'
        is set to '4' or something weird. (?not sure?)

        Tabs work fine when they're left at the '8' setting, and are needed
        for things like Makefiles. Indenting works equally well for both C
        and Python if you let tabs be tabs.

        Certainly printers and terminals all expect tabs to be 8,
        as well as is the default for terminals (xterm, vt100, dumb terminals, 
etc),
        so having tabs left to their normal 8 stop behavior will allow files 
made with
        tabs and/or tabs and space combos to work correctly in all cases.

        All files I create can be lpr'ed, more'ed, cat'ed and all look 'right'.
        But files from folks with tabstops set oddly will look totally wrong
        in all those cases.

        I don't think rejecting tabs is a good idea, as there should really
        be no problem if people use spaces or tabs or both as long as they're
        used 'correctly'. The only time a problem comes up is when editors are
        set to have tab stops set to odd things.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to