Re: Correct Identation/Contex can solve the too many compiler error messages problem when a closing bracket is missing.



On Fri, 9 Sep 2005 22:02:01 +0200, "Skybuck Flying"
<nospam@xxxxxxxxxxx> wrote:

>I have proven that one style is cumbersome and therefore dumb and one style
>is handy and therefore smart.

No you haven't. You have shown the style you prefer, and discussed why
you prefer it. That's fine but it doesn't make prove it is the best
for everyone, every time.

>You have failed to produce any reasoning, prove or examples of the opposite.

You have failed to understand my reasoning. My reasoning is that other
people can prefer a different style, and their choice is equally as
valid as yours or mine. Hence we should try to get away from dictating
a particular style.

>> a) Different people may prefer different styles, often for very good
>> reasons.
>
>Different People ?

People other than you. This may come as a shock, but other people can
have opinions that are just as valid as yours.

>May ?

Are allowed to have. Might have. Could have. Or they might agree with
you. It is their choice.

>Reasons ?

Developers don't pick a code layout at random. You have a rationale
for using the format you prefer, and so do other people.

>Styles ?

Layout or format. Did I really need to speel this out for you?

>Please be more specific.

My whole point is that it is not necessary to be specific if you
accept that other people have good reasons for laying out their code
the way they do. If someone likes to indent by 17 spaces that is their
choice, and it really doesn't matter that I would hate it. If I said I
prefered a 17-space indentation it would be more specific but then yor
would just argue about whether 17 spaces is good or not. Get away from
the specific and understand that NO MATTER WHAT STYLE someone else
prefers, if it works for them, that is OK. I am not arguing in favour
of a specific style, I am arguing in favour of each developer being
able to use the style they personally prefer, rather than trying to
impose the same style on everyone.

>No you cannot easily re-format the code with a formatting utility simply
>because there isn't a single formatting utility in the world that supports
>all different coding styles.

If you want a style that is so unusual that no code format utility
supports it, I am even more amazed that you would seek to impose that
style on others.

>1. No. I could not use tab characters because ms outlook express can't work
>with it.

Exactly. Other people may use tools that cannot cope well with tabs.
For example, suppose I want to cut and paste a snippet of your code
into some documentation prepared in a word processor. Setting up tabs
to make code indentation correct is often time-consuming and tedious.
With spaces it just works. But if you want to use tabs, fine. That is
your choice but you should understand that other people might make a
different choice.

>3. No. Using tabs is better for sharing code with other people.

No, it is a real pain in the ass. If your code has tabs every 4 spaces
and Joe's code has tabs every 3 spaces, and I am working with both,
how do I set up my editor?

>As soon as people realise this the discussion/arguing/stubernness about
>which method in theory is better should cease to exist.

LOL. As soon as everyone agrees with you, the world will be a better
place? Doesn't that strike you as being a little arrogant?

The discussion would also go away if we agreed that we need to find a
way for everyone to be able to use the style they find easiest, whilst
being able to easily exchange code with others, or maintain a house
style. A code format utility achieves that. It lets you choose any
style you prefer, and I can choose any style I prefer. If I provide
you with some code you can easily re-format it the way you like it
before you work with it. Doesn't that seem a lot better than trying to
force me to work with the style you prefer?

>The delphi text editor is not as good as other text editors like textpad
>which allow to work much faster with tabs by simpling jumping from tab to
>tab. Delphi on the other hand is slower because the cursor has to go through
>the tabs like if they were spaces.

I'm not saying that the Delphi text editor is the best there is, but I
don't follow what you are saying here. What do you mean by saying that
"the cursor has to go through the tabs like if they were spaces"? Can
you give an example?

>> For me, the keyboard shortcuts for indenting / unindenting blocks of
>> code, plus smart tabs, mean that achieving the layout I want is easy
>> enough, even when I cut/paste/delete etc.
>
>Still sounds cumbersome... Let me guess:

Why guess? You are saying you don't know, and can't be bothered to
find out, but you are going to pass judgement anyway. Getting back to
that arrogance again.

>I have to first select the text which I want to indent and then press some
>kind of keyboard shortcut...

Yes

>and ofcourse when I accidently do it wrong I
>loose my code ?

No matter what you are doing you can always accidentally press delete.
If you are prone to that mistake you might like to investigate the
undo feature of your favourite editor.

--
Duncan

.



Relevant Pages

  • Re: Source formatting
    ... default settings in his/her editor. ... If you use tabs, use them for logical indentation, not to produce a ... and your formatting problems vanish into ... indent that line; select a group of lines or a C block, press tab, ...
    (comp.lang.c)
  • Re: Source formatting
    ... default settings in his/her editor. ... Carefully, beautifully and *manually* formatting code is a tremendous waste of time, and as you've discovered, it's not a stable process. ... If you use tabs, use them for logical indentation, not to produce a particular amount of whitespace, and your formatting problems vanish into thin air. ... indent that line; select a group of lines or a C block, press tab, ...
    (comp.lang.c)
  • Re: Tabbing probs
    ... times to indent back after the end of a block. ... And here is a bug. ... which contains tabs. ... editor to test automatically if a file has spaces or tabs. ...
    (comp.lang.python)
  • Re: tabbing probs (was: Prothon Prototypes vs Python Classes)
    ... This is where tabs originated. ... If someone uses eight spaces to indent will that also ... > to configure an editor to show eight spaces as four columns. ... Supposing that I ...
    (comp.lang.python)
  • Re: cooking the spaghetti
    ... The wise user includes a comment in his original which specifies ... how to set up the tabs. ... and I'll run your code through indent before I try to read it (and ... with the tabstop settings adjusted as necessary. ...
    (comp.lang.c)