From: Nick Keighley on
On 27 Feb, 08:39, James Harris <james.harri...(a)googlemail.com> wrote:

> Windows Notepad users are stuck with 8. Windows Wordpad users seem to
> be stuck with 6. These are not earlier than the 1980s.
>
> Come to think of it, apart from those two programs what do Windows
> users use to enter and edit source code?

the IDE, ConText, emacs, Word

From: Nick Keighley on
On 27 Feb, 05:32, Kelsey Bjarnason <kbjarna...(a)gmail.com> wrote:
> On Fri, 26 Feb 2010 12:29:13 +0000, Tim Streater wrote:

> > Trouble with tabs is, what is a tab?
>
> It's a character, often ASCII 9, which tells your editor to indent (or,
> on removal, unindent) by whatever number of columns is required to bring
> things in line with the next (previous) tab stop.

so your layout is tab-stop dependent


> Contrast that to hitting delete on a line which uses spaces instead of
> tabs.  All this does is mess up the formatting, as the editor is almost
> certain to treat a space as a _space_, as it should, not as a tab, which
> it _shouldn't_, because the character involved is not a tab, but a space.

get a better editor


> Then, of course, there's inserting.  Hit space.  See how many columns the
> line indents.  One, isn't it?

but if I hit 'tab' my editor inserts four spaces. Or rather enough
spaces to make it a multiple of four or to line up with the preceeding
line

>  Why is that?  Oh, yes, because spaces
> aren't tabs, and editors won't treat them as tabs.  Tabs are tabs, and
> editors treat them that way.

mine doesn't

> AFAIK, even Emacs and vi can cope with tabs.  I've yet to meet _any_
> editor which, when you delete a space, correctly determines that you
> really meant to delete four spaces, and removes that many,

ConTEXT (on Windows)

> or, when you
> hit the spacebar, correctly figures out that you actually meant a tab,
> not a space, and thus inserts 4 (or is it 3?  8?  5?) spaces.

but TAB does that for me

> > I use the tab key but my editor
> > (TextWrangler) just converts them to spaces. Why should spaces bother an
> > editor, anyway?

well I'd argue you aren't using TABs in your source text

> Because spaces, for purposes of indentation, are defective by design, and
> editors are generally built in such a manner as to use the right thing
> for the right job.  Spaces between words, etc, tabs for indentation.

From: Nick Keighley on
On 27 Feb, 06:00, Richard <rgrd...(a)gmail.com> wrote:
> Kelsey Bjarnason <kbjarna...(a)gmail.com> writes:
> > [snips]
>
> > On Fri, 26 Feb 2010 12:29:13 +0000, Tim Streater wrote:
>
> >> Trouble with tabs is, what is a tab?
>
> > It's a character, often ASCII 9, which tells your editor to indent (or,
> > on removal, unindent) by whatever number of columns is required to bring
> > things in line with the next (previous) tab stop.
>
> Something tells me Tim might have know that.
>
>
>
> > Contrast that to hitting delete on a line which uses spaces instead of
> > tabs.  All this does is mess up the formatting, as the editor is almost
> > certain to treat a space as a _space_, as it should, not as a tab, which
> > it _shouldn't_, because the character involved is not a tab, but a
> > space.
>
> Not with any half competent editor.
>
>
>
> > Then, of course, there's inserting.  Hit space.  See how many columns the
> > line indents.  One, isn't it?  Why is that?  Oh, yes, because spaces
> > aren't tabs, and editors won't treat them as tabs.  Tabs are tabs, and
> > editors treat them that way.
>
> And often treat spaces as tabs too. press left or right or delete on y
> white space area and it deletes to a tap stop.
>
>
>
> > AFAIK, even Emacs and vi can cope with tabs.  I've yet to meet _any_
>
> Even? Emacs is probably the most advanced editor out there. And vi one
> of the most popular programmers editor.
>
> > editor which, when you delete a space, correctly determines that you
> > really meant to delete four spaces, and removes that many, or, when you
> > hit the spacebar, correctly figures out that you actually meant a tab,
> > not a space, and thus inserts 4 (or is it 3?  8?  5?) spaces.
>
> >> I use the tab key but my editor
> >> (TextWrangler) just converts them to spaces. Why should spaces bother an
> >> editor, anyway?
>
> They don't if you're half competent and configure it properly.
>
>
>
> > Because spaces, for purposes of indentation, are defective by design,
> > and
>
> What total bullshit. Most people use spaces for indentation.
>
> > editors are generally built in such a manner as to use the right thing
> > for the right job.  Spaces between words, etc, tabs for indentation.
>
> Totally and utterly wrong. Its rare to find tabs used anymore. Most
> editors are LSEs (language sensitive editors) and indent automatically
> based on a configured language layout.

For once, I agree with one of your posts!


From: Rich Webb on
On Sat, 27 Feb 2010 08:30:16 -0800 (PST), Nick Keighley
<nick_keighley_nospam(a)hotmail.com> wrote:

>On 27 Feb, 08:39, James Harris <james.harri...(a)googlemail.com> wrote:
>
>> Windows Notepad users are stuck with 8. Windows Wordpad users seem to
>> be stuck with 6. These are not earlier than the 1980s.
>>
>> Come to think of it, apart from those two programs what do Windows
>> users use to enter and edit source code?
>
>the IDE, ConText, emacs, Word

vi! Nowadays likely in its gvim incarnation, of course.

--
Rich Webb Norfolk, VA
From: Casper H.S. Dik on
Nick Keighley <nick_keighley_nospam(a)hotmail.com> writes:

>On 27 Feb, 13:56, Casper H.S. Dik <Casper....(a)Sun.COM> wrote:
>> i...(a)localhost.claranet.nl (Ike Naar) writes:

>> Things I absolutely hate in some c-styles are:
>>
>> =A0 =A0 =A0 =A0 if(condition)
>>
>> "if" is a not a *function* it shouldn't look like one.

>I write it like this

> if (condition)
> some_func (x);

>and 'if' still doesn't look like a function to me


It is fine with the space but not without (if() vs if ())

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
First  |  Prev  |  Next  |  Last
Pages: 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Prev: integer
Next: shared memory question