From: Rich Webb on
On Fri, 26 Feb 2010 15:12:02 +0000, Tim Streater
<timstreater(a)waitrose.com> wrote:

>On 26/02/2010 14:51, Richard Heathfield wrote:
>> Tim Streater wrote:
>> <snip>
>>
>>> Trouble with tabs is, what is a tab?
>>
>> A quick way of inserting exactly two spaces into the source.
>
>Since I don't know what tab setting you had when you handed me the code,
>I think s/exactly two/a random number of/ applies here.

[George Lucas missed a bet when he chose to make Star Wars instead of
Style Wars.]

In the context of C source files, the tab character (\t or \x09 or 0x09
or however expressed) should always advance the cursor position to the
next mod 8 column.

The tab *key* on the other hand, may be chosen by the user to insert a
tab character, or a fixed number of spaces, or a variable number of
spaces which advance the cursor to a preferred mod n column.

Hard tabs in code that presume other than "every eight" are just evil.

--
Rich Webb Norfolk, VA
From: Nick Keighley on
On 26 Feb, 15:33, Rich Webb <bbew...(a)mapson.nozirev.ten> wrote:
> On Fri, 26 Feb 2010 15:12:02 +0000, Tim Streater
>
> <timstrea...(a)waitrose.com> wrote:
> >On 26/02/2010 14:51, Richard Heathfield wrote:
> >> Tim Streater wrote:

> >>> Trouble with tabs is, what is a tab?
>
> >> A quick way of inserting exactly two spaces into the source.
>
> >Since I don't know what tab setting you had when you handed me the code,
> >I think s/exactly two/a random number of/ applies here.
>
> [George Lucas missed a bet when he chose to make Star Wars instead of
> Style Wars.]

too violent to get a 15 certificate


> In the context of C source files, the tab character (\t or \x09 or 0x09
> or however expressed) should always advance the cursor position to the
> next mod 8 column.

yes but even *this* isn't fixed. It's configurable "on most editors
designed within the last twenty years". If there were any concensus on
this I might accept tab characters in my source code.

> The tab *key* on the other hand, may be chosen by the user to insert a
> tab character, or a fixed number of spaces, or a variable number of
> spaces which advance the cursor to a preferred mod n column.
>
> Hard tabs in code that presume other than "every eight" are just evil.

yes. But as I noted earlier I've worked on a project was it was
compulsory to use them.

From: Nicolas George on
Richard Heathfield wrote in message
<FqmdncxYjq_tehrWnZ2dnUVZ7t5i4p2d(a)bt.com>:
> No, exactly two. Always. It's the One True Tab Size.

Would you be interested in a keyboard that, instead of the space bar, has
six standard-sized keys that insert respectively 0, 1, 2, 3, 4 and 5 spaces?
From: Andrew Poelstra on
On 2010-02-26, Nicolas George <nicolas$george(a)salle-s.org> wrote:
> Richard Heathfield wrote in message
><FqmdncxYjq_tehrWnZ2dnUVZ7t5i4p2d(a)bt.com>:
>> No, exactly two. Always. It's the One True Tab Size.
>
> Would you be interested in a keyboard that, instead of the space bar, has
> six standard-sized keys that insert respectively 0, 1, 2, 3, 4 and 5 spaces?

Think how futuristic you would feel to tell people, your
keyboard has a "space-pad" in addition to the numpad.


--
Andrew Poelstra
http://www.wpsoftware.net/andrew
From: Tim Streater on
On 26/02/2010 15:23, Richard Heathfield wrote:
> Tim Streater wrote:
>> On 26/02/2010 14:51, Richard Heathfield wrote:
>>> Tim Streater wrote:
>>> <snip>
>>>
>>>> Trouble with tabs is, what is a tab?
>>>
>>> A quick way of inserting exactly two spaces into the source.
>>
>> Since I don't know what tab setting you had when you handed me the code,
>
> It doesn't matter, since all you get is spaces. (Well, hopefully you get
> some code in between the white spaces, too...)
>
>> I think s/exactly two/a random number of/ applies here.
>
> No, exactly two. Always. It's the One True Tab Size. And if you
> disagree, obviously you're not a real Scotsman.

<innocent look>
You mean they tend to cheesepare?
</innocent>

--
Tim

"That the freedom of speech and debates or proceedings in Parliament
ought not to be impeached or questioned in any court or place out of
Parliament"

Bill of Rights 1689
First  |  Prev  |  Next  |  Last
Pages: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Prev: integer
Next: shared memory question