Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Information is the inverse of entropy.


devel / comp.std.c / Re: C23: asctime is obsolescent

SubjectAuthor
* C23: asctime is obsolescentPete Forman
+- C23: asctime is obsolescentKeith Thompson
`- C23: asctime is obsolescentPhil Carmody

1
Re: C23: asctime is obsolescent

<ysfilhnmyyw.fsf@gmail.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=870&group=comp.std.c#870

  copy link   Newsgroups: comp.std.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: petef4+usenet@gmail.com (Pete Forman)
Newsgroups: comp.std.c
Subject: Re: C23: asctime is obsolescent
Date: Tue, 03 Jan 2023 15:15:03 +0000
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <ysfilhnmyyw.fsf@gmail.com>
References: <875yf5ksn9.fsf@nosuchdomain.example.com>
<861qocrk5b.fsf@linuxsc.com> <871qocphp0.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="a659df0fbcf63c8ace2aa2c42258f853";
logging-data="2273254"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SlFTpVP19LObdAQsheouZ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (windows-nt)
Cancel-Lock: sha1:QH6ywJ3V38yurA6jsBLg8S52bIw=
sha1:irPg+YvlV/ooxNuxi1zdc9ZidNM=
 by: Pete Forman - Tue, 3 Jan 2023 15:15 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>> In the latest C23 draft:
>>> https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf
>>> the descriptions of the __DATE__ and __TIME__ macros refer to the
>>> asctime() function.
>>>
>>> That's not new. What's new is that asctime() is deprecated.
>>>
>>> Referring to a deprecated function isn't really a problem, but if
>>> asctime() is actually removed in a future standard the descriptions of
>>> __DATE__ and __TIME__ will need to be updated.
>>>
>>> It would also be nice to have a new macro that expands to the current
>>> date in the form "YYYY-MM-DD". I do not suggest changing the behavior
>>> of __DATE__, but perhaps something like __ISODATE__ could be added.
>>> Question: If this is done, should __DATE__ be deprecated?
>>
>> It seems pointless to add __ISODATE__ if __DATE__ is retained, and
>> worse than pointless to add __ISODATE__ and then remove __DATE__.
>>
>> Similar comments apply to __TIME__, which also refers to asctime().
>
> I agree that __DATE__ should not be removed. On further thought, I
> don't think it should be deprecated. The format it uses, "Jan 2 2023",
> is too region-specific, but presumably some C code uses it, and it can't
> be fully re-implemented in user code.
>
> If asctime() is removed in a future standard, then the descriptions of
> __DATE__ and __TIME__ would have to be updated. I offer no opinion on
> whether asctime() *should* be deprecated.

The "a" in asctime() stands for American, as in ASCII as introduced in
Unix V7.

https://man.cat-v.org/unix_7th/3/ctime

--
Pete Forman

Re: C23: asctime is obsolescent

<87wn63o495.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=871&group=comp.std.c#871

  copy link   Newsgroups: comp.std.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.std.c
Subject: Re: C23: asctime is obsolescent
Date: Tue, 03 Jan 2023 10:35:34 -0800
Organization: None to speak of
Lines: 38
Message-ID: <87wn63o495.fsf@nosuchdomain.example.com>
References: <875yf5ksn9.fsf@nosuchdomain.example.com>
<861qocrk5b.fsf@linuxsc.com> <871qocphp0.fsf@nosuchdomain.example.com>
<ysfilhnmyyw.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="a5ee6487fac100578e1eb211b538cf09";
logging-data="2311524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192oM9TDnjPlapw7aXjGHg6"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:RGgwihlqPfpzffxJUxONebc17KM=
sha1:oDqiaaLWgCDT6Ee2983YeVVLAqs=
 by: Keith Thompson - Tue, 3 Jan 2023 18:35 UTC

Pete Forman <petef4+usenet@gmail.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
>> I agree that __DATE__ should not be removed. On further thought, I
>> don't think it should be deprecated. The format it uses, "Jan 2 2023",
>> is too region-specific, but presumably some C code uses it, and it can't
>> be fully re-implemented in user code.
>>
>> If asctime() is removed in a future standard, then the descriptions of
>> __DATE__ and __TIME__ would have to be updated. I offer no opinion on
>> whether asctime() *should* be deprecated.
>
> The "a" in asctime() stands for American, as in ASCII as introduced in
> Unix V7.
>
> https://man.cat-v.org/unix_7th/3/ctime

Yes, and all C keywords are English words, or derived from English words
or names (George Boole was English). It's not possible to avoid all
region-specific features.

asctime() (also ctime()) is clearly a legacy function using an overly
US-specific format. If the question were whether to introduce it now,
the answer would clearly be no. And the committee has already decided
to mark it as obsolescent in C23, meaning it could be removed in a later
edition. I believe C23 has been finalized, so it's no longer possible
to reverse that decision. But I expect that it will remain in the
standard for a long time.

(And I *hate* that newline at the end, but it's far too late to fix that.)

Removing it would clearly have a cost, since it would break any programs
that uses it.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Re: C23: asctime is obsolescent

<874jt65kxs.fsf@zotaspaz.fatphil.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=872&group=comp.std.c#872

  copy link   Newsgroups: comp.std.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: pc+usenet@asdf.org (Phil Carmody)
Newsgroups: comp.std.c
Subject: Re: C23: asctime is obsolescent
Date: Wed, 04 Jan 2023 18:22:23 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <874jt65kxs.fsf@zotaspaz.fatphil.org>
References: <875yf5ksn9.fsf@nosuchdomain.example.com>
<861qocrk5b.fsf@linuxsc.com> <871qocphp0.fsf@nosuchdomain.example.com>
<ysfilhnmyyw.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="f7f262a204b99b70b23b115ac4c54454";
logging-data="2654170"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pkPz+0rP16X4+tD7s6pWu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Cancel-Lock: sha1:ZXKolgvAWBvfH/GLdytqFtuX/AE=
sha1:0kIq3/0AV0OKKMnc6LoMxHcCPro=
 by: Phil Carmody - Wed, 4 Jan 2023 16:22 UTC

Pete Forman <petef4+usenet@gmail.com> writes:
> The "a" in asctime() stands for American, as in ASCII as introduced in
> Unix V7.
>
> https://man.cat-v.org/unix_7th/3/ctime

No. The "asc" in asctime() stands for ASCII. "stands for" is not
a transitive relation.

Phil
--
We are no longer hunters and nomads. No longer awed and frightened, as we have
gained some understanding of the world in which we live. As such, we can cast
aside childish remnants from the dawn of our civilization.
-- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor