Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- From: Jordan Abel <jmabel@xxxxxxxxxx>
- Date: Fri, 16 Dec 2005 00:59:28 +0000 (UTC)
On 2005-12-15, Mark McIntyre <markmcintyre@xxxxxxxxxxx> wrote:
>>> 17.1: What's the best style for code layout in C?
>>>
>>> A: There is no one "best style," but see the full list for a few
>>> suggestions.
>>
>>Yes there is.
>
> This is a religious issue, if you want to make serious comments about
> the FAQ, steer clear of such points. To do otherwise risks starting a
> religious war about the most trivial of your comments... :-(
I was just noting that the full list only actually offers one
suggestion, maybe two [it makes a passing mention of indian hill, which
i haven't looked at to see if it differs meaningfully from K&R] -
certainly nothing like giving equal time to, for example, the GNU style,
which while I personally dislike it, it is well-specified and has a huge
volume of code.
[Modified to quote the full answer - you snipped the part I was replying
to.]
>>> 20.32: Is (year % 4 == 0) an accurate test for leap years?
>>>
>>> A: No, it's not accurate (and yes, 2000 was a leap year).
>>> The full expression for the present Gregorian calendar is
>>>
>>> year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
>>>
>>> See a good astronomical almanac or other reference for details.
>>> (To forestall an eternal debate: references which claim the
>>> existence of a 4000-year rule are wrong.) See also question
>>> 13.14.
>>
>>the next 1994 years and two-and-a-half months is a long time, so
>>worrying about whether such a rule will or will not have been instituted
>>by then is meaningless.
>
> You obviously aren't an astronomer.
All I know is, the solar year is, according to units(1), 365.242198781
days. The gregorian year is 365.2425 days. this is a difference of about
1.2 days in 4000 years. Adding a rule that one year in 4000 is not a
leap year would change the fraction to, I believe, 365.24225. Whether or
not it's justified by the astronomy, it's, with the numbers i can find,
justified by the math. The only thing that the list's claim that there
is no 4000 year rule has going for it is the fact that no such rule has
actually been declared at the present time.
If the answer were as clear-cut as you seem to think it is, there
wouldn't BE references which claim there either is or ought to be such a
rule.
My point was merely that it's not worth accounting for a possible 4000
year rule because it's so far in the future [we're talking millennia,
not decades as with Y2K] and, of course, hasn't yet been settled on.
[whether the length of the day is long-term stable enough to justify
such a rule, on the other hand, I have no clue about. there are tidal
effects to take into account slowing down the earth's rotation.]
.
- Follow-Ups:
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- From: Richard Tobin
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- From: Mark McIntyre
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- References:
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- From: Jordan Abel
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- From: Mark McIntyre
- Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- Prev by Date: Re: no-op function pointer
- Next by Date: Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- Previous by thread: Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- Next by thread: Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
- Index(es):
Relevant Pages
|