August 14, 2006
Uh-huh, sure.

You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...

Why do you prefer it, if I may ask?

-[Unknown]


> It works just fine when you set tabs to be 8 characters, as god intended them to be.
August 14, 2006
Unknown W. Brackets wrote:
> Uh-huh, sure.
> 
> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
> 
> Why do you prefer it, if I may ask?
> 
> -[Unknown]
> 
> 
>> It works just fine when you set tabs to be 8 characters, as god intended them to be.


Because it isn't screwed up when you type it to the screen or the printer.
August 14, 2006
On Mon, 14 Aug 2006 02:47:52 -0700, Walter Bright wrote:

> Unknown W. Brackets wrote:
>> Uh-huh, sure.
>> 
>> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
>> 
>> Why do you prefer it, if I may ask?
>> 
>> -[Unknown]
>> 
>>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
> 
> Because it isn't screwed up when you type it to the screen or the printer.

LOL ... you *so* locked into the past its almost sad.

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"
August 14, 2006
Walter Bright wrote:
> Unknown W. Brackets wrote:
>> Uh-huh, sure.
>>
>> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
>>
>> Why do you prefer it, if I may ask?
>>
>> -[Unknown]
>>
>>
>>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
> 
> 
> Because it isn't screwed up when you type it to the screen or the printer.

Out of the infinite number of ways an editor can display a tab on the screen or print it, it isn't screwed up in *only* one way. So, I'd say that the average probability of it being screwed up is 100%.
August 14, 2006
"Walter Bright" <newshound@digitalmars.com> wrote in message news:ebp2j7$1o5c$1@digitaldaemon.com...

> It works just fine when you set tabs to be 8 characters, as god intended them to be.

Or, you could just set them to 4 characters, and always use tabs.  Then everyone would be able to control the indentation as much as they want. That's the whole point of using hard tabs in a modern editor.


August 14, 2006
Walter Bright wrote:
> Unknown W. Brackets wrote:
>> Uh-huh, sure.
>>
>> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
>>
>> Why do you prefer it, if I may ask?
>>
>> -[Unknown]
>>
>>
>>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
> 
> 
> Because it isn't screwed up when you type it to the screen or the printer.

Might I suggest it also isn't screwed up if you're consistent in using either X spaces or one tab consistently to represent a level of indentation? :) (At least, that takes one possible way of screwing it up out of the equation)

Oh, and if you prefer 8-space indentation, I'd like to suggest you use hard tabs (consistently!) so others can easily view it at 4 spaces (or whatever their personal preference may be).
August 14, 2006
In my code, I use hard tabs for everything and set my tab-width to 4 spaces.

I've never had trouble with printing code (something I do less often than have birthdays, mind you) nor any text editor displaying my code weirdly.

Some people hate hard tabs, because they just have to line things up after a non-tab character with tabs.  I think this is a Bad Thing (TM), but if you have to do it, I understand using spaces.

But I've never seen a case where a program would misbehave if the tab width was not set to 8.... I just can't wrap my head around the benefit of using both tabs *and* spaces.

-[Unknown]


> Unknown W. Brackets wrote:
>> Uh-huh, sure.
>>
>> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
>>
>> Why do you prefer it, if I may ask?
>>
>> -[Unknown]
>>
>>
>>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
> 
> 
> Because it isn't screwed up when you type it to the screen or the printer.
August 14, 2006
Jarrett Billingsley wrote:
> "Walter Bright" <newshound@digitalmars.com> wrote in message news:ebp2j7$1o5c$1@digitaldaemon.com...
> 
>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
> 
> Or, you could just set them to 4 characters, and always use tabs.  Then everyone would be able to control the indentation as much as they want. That's the whole point of using hard tabs in a modern editor. 

Hard tabs work okay for leading indentation, but for inner indentation--long function calls, if statements, variable lists, etc--they can render code unreadable if viewed with a different tab width.  Even worse is if in a group project, some people use hard tabs and others spaces, and those using hard tabs have different tab widths.  I've worked on projects like this (including the one I'm on now) and the tabs are a disaster.  Given the relative ease with which modern editors can jump from word to word and eat whitespace, I simply don't understand the attachment to hard tabs.


Sean
August 14, 2006
Unknown W. Brackets wrote:
> In my code, I use hard tabs for everything and set my tab-width to 4 spaces.
> 
> I've never had trouble with printing code (something I do less often than have birthdays, mind you) nor any text editor displaying my code weirdly.
> 
> Some people hate hard tabs, because they just have to line things up after a non-tab character with tabs.  I think this is a Bad Thing (TM), but if you have to do it, I understand using spaces.
> 
> But I've never seen a case where a program would misbehave if the tab width was not set to 8.... I just can't wrap my head around the benefit of using both tabs *and* spaces.

This is how Emacs works and has worked for ages. Tabs are not directly used for indentation, but rather for optimizing the number of spaces needed. I guess at some time in the past, those 7 bytes saved here and there were well worth it. It would probably improve output speed on old teletypes and save memory at the same time. Those old teletypes could not redefine the tab stops anyway (well, I know the modern vt100 could, but not the vt52 afaik), so any other use for the tab character wasn't realistic.

Today, the benefits are not as clear... :)

/Oskar
August 14, 2006
Unknown W. Brackets wrote:
> In my code, I use hard tabs for everything and set my tab-width to 4 spaces.
> 
> I've never had trouble with printing code (something I do less often than have birthdays, mind you) nor any text editor displaying my code weirdly.
> 
> Some people hate hard tabs, because they just have to line things up after a non-tab character with tabs.  I think this is a Bad Thing (TM), but if you have to do it, I understand using spaces.
> 
> But I've never seen a case where a program would misbehave if the tab width was not set to 8.... I just can't wrap my head around the benefit of using both tabs *and* spaces.
> 
> -[Unknown]
> 
> 
>> Unknown W. Brackets wrote:
>>> Uh-huh, sure.
>>>
>>> You're usually right, but I don't like having to hit backspace four times or 1 time alternatively based on my indentation level.  That's just bizarre.  I've never seen someone mix tabs like that before...
>>>
>>> Why do you prefer it, if I may ask?
>>>
>>> -[Unknown]
>>>
>>>
>>>> It works just fine when you set tabs to be 8 characters, as god intended them to be.
>>
>>
>> Because it isn't screwed up when you type it to the screen or the printer.

For what it's worth, I think Sean is talking about code like this:

switch(x){
	case 'foo':		break; // 2 tabs
	case 'something':	break; // 1 tab
}

On my display, with tab=8 spaces in Thunderbird, the 'break' statements all line up perfectly. If your viewer has it set to something else (say 4 spaces), it doesn't look right.  So its the /internal/ indentation that fails here, as the left column will always look clean.

IMO, this is what code beautifiers are for.  I'm not going to worry about inconsistent tabbing and spacing in any of my projects until release time comes around anyway. ;)

-- 
- EricAnderton at yahoo