From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AW: [HACKERS] LONG varsize - how to go on (pgindent) |
Date: | 1999-12-22 08:07:40 |
Message-ID: | 386086CC.2E3125FB@tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> > I think the idea at that time was also, that with a tab only setup
> > people can look at the code with 2 space, 3 space and 4 space indents,
> > whatever suits them best.
>
> Not really. If the code still looked OK at different tab widths, people
> wouldn't be complaining. A fairly typical example is
>
> if (root->query_pathkeys == NIL ||
> pathkeys_contained_in(root->query_pathkeys,
> final_rel->cheapestpath->pathkeys))
> {
> root->query_pathkeys = final_rel->cheapestpath->pathkeys;
>
> which is really
>
> <tb>if (root->query_pathkeys == NIL ||
> <tb><tb>pathkeys_contained_in(root->query_pathkeys,
> <tb><tb><tb><tb><tb><tb><tb> final_rel->cheapestpath->pathkeys))
> <tb>{
> <tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;
So we either need ident that understands C syntax and formats the
above as
<tb>if (root->query_pathkeys == NIL ||
<tb><tb>pathkeys_contained_in(root->query_pathkeys,
<tb><tb> final_rel->cheapestpath->pathkeys))
<tb>{
<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;
or just use spaces for indentation
I transferred all my coding to spaces-only after starting with python
about 5-6 years ago, as in python the whitespace is meaningful to parser
too and not only to human reader.
Python has even a special script for detecting space/tab combinations
that can potentially break things.
And it would be easy for someone who desparately needs tabs in his code
to run a much-simpler-than-indent script on the spaces only source to get
what we have currently (and another script to put the spaces back before
submitting patches)
-------------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 1999-12-22 14:52:54 | TOAST project page |
Previous Message | neil d. quiogue | 1999-12-22 06:52:14 | Re: [HACKERS] Re: QUESTION: Replication |