[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev patch - "JUSTIFY"
From: |
mattack |
Subject: |
Re: lynx-dev patch - "JUSTIFY" |
Date: |
Wed, 14 Jul 1999 12:10:05 -0700 (PDT) |
On Wed, 14 Jul 1999, T.E.Dickey wrote:
>Date: Wed, 14 Jul 1999 14:44:54 -0400 (EDT)
>From: "T.E.Dickey" <address@hidden>
>Reply-To: address@hidden
>To: address@hidden
>Subject: Re: lynx-dev patch - "JUSTIFY"
>
>> I realize this is a religious issue, but what I found most difficult about
>> reading the Lynx code is the brace style.
>>
>> There are many different ways of implementing the following (and I realize I
>> do it differently from others, but will conform to slightly different
>> styles when dealing with other people's code), but simply matching up
>> paired curly brackets would help readability a lot.
>>
>> if (LYNoCore) {
>> exit(-1);
>> }
>
>where _don't_ they match? I have some simple checks that I run periodically
>to find stuff like
As I said, they don't match vertically..
if (LYNoCore)
{
exit(-1);
}
(that's no exactly how I would indent if I were writing something from scratch,
but I'm trying to show the least common denominator in the style I mean.)
Even on a 24 line terminal, I'd rather waste the line to have it readable at
a glance rather than having to figure out/use a software feature to match
up the braces.
if (this)
{
if (that)
{
so and so
}
else
{
such and such
}
}
is readable at a glance, moreso than putting the curly brackets on the same
line as the if. (That above is my "weird" style of indenting where even the
brackets get indented.. It's basically a C-ized version of the Pascal indenting
I learned senior year of high school, in 1986-1987.)
Aaagh, I didn't want to get into this, I just wanted to mention that this
indenting style, as well the lack of comments, are what makes lynx lynx hard
to read.
And even if the switches-within-switches were broken into their own functions,
simply for readability purposes (even though they add a tiny bit of runtime
overhead), would be an improvement.
ohwell
- Re: lynx-dev patch, (continued)
- Re: lynx-dev patch, Vlad Harchev, 1999/07/13
- Re: lynx-dev patch - "JUSTIFY", Klaus Weide, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Vlad Harchev, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Klaus Weide, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Vlad Harchev, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Philip Webb, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", mattack, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", T.E.Dickey, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY",
mattack <=
- Re: lynx-dev patch - "JUSTIFY", T.E.Dickey, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", David Combs, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", mattack, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", David Combs, 1999/07/15
- Re: lynx-dev patch - "JUSTIFY", Peter Wright, 1999/07/15
- lynx-dev code indentation style (was "JUSTIFY") - warning, "religious" topic..., Klaus Weide, 1999/07/14
- lynx-dev change to status line, Eduardo Chappa L., 1999/07/14
- Re: lynx-dev change to status line, Klaus Weide, 1999/07/14
- Re: lynx-dev change to status line, Eduardo Chappa L., 1999/07/15
- Re: lynx-dev change to status line, Klaus Weide, 1999/07/15