On Wednesday 11 February 2004 00:42 CET Daniel Quinlan wrote:
> "Malte S. Stretz" <[EMAIL PROTECTED]> writes:
> > Uh, no, please not. That's one thing I always "fix" when I see it (I
> > never had the idea this might be intentional -- to me it was just some
> > annoying behaviour of some editors, incuding vim). Either always use
> > tabs or always use two spaces, but don't mix-and-match.
>
> Mix-and-match, yes!
>
> *Some* editors?  It's *both* emacs and vim and it's done as a default in
> those because it makes navigation easier. 

Huh? I can't see any way how \t\s\s\s\s for a 12er-indentation makes 
navigation easier. In my eyes it makes it even *worse*: I hate it when I'm 
on column 2 and move down the curser and it starts to jump around wildly.

> Representing 32 consecutive columns as spaces is annoying.  

Why? What the hell is annoying about this?

> To turn around Kenneth's argument, in 
> this day and age when every editor can handle tabs very well, is there
> any reason to use spaces slavishly for columns?

As I said in the first place, I don't really care if it is two spaces or 
tabs. I've been heavily on the spaces camp back in time, but if folks want 
to use tabs that's ok with me.

But *don't* mix it, ie. replace every eight spaces with tabs. That is always 
inconsistent because every editor does it differently and what's even 
worse, it makes changing indentations a PITA, eg. if you have to outdent an 
eighter-spaces-block into a sixer. Plus other annoyances I can't remember 
currently but which bit me when I edited such code.

> > You mean a newline before the curly brace? I think the rule of thumb is
> > to do so for subs and big blocks, short blocks may have the curly on
> > the same line.
>
> No, just after the first set of declarations.

Ah, ok, I thought you meant the newline before the brace, so

> sub foo {

sub foo
{

> > Please not 4. Either two or tabs, everything else is a pain in the
> > thumb to code with when you don't have a good editor around.
>
> What, are you using edlin or something?

No, vim and KWrite. Sometimes also nano and vi, depends on the system I'm 
on. But even in vim you sometimes have to correct the indentation manually 
(actually do I often ':set noai' when vim again annoys the hell out of me).

> > All the three above should be the same, either 1 or 2, I'd prefer 1.
>
> Why the same?  They are separate options for a reason.  1,2,2 I think.

But the rationale is the same for all three of them. As I know myself, will 
I probably continue to code in 2,2,2, but 1,1,1 should be more readable :) 
I don't really care about this.

> > -sbl :)
>
> Yeah, you lose this one.  :-)

I'm fine with anything but -bli and -icb. And mixing tabs and spaces ;-)

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Reply via email to