Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: 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> 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= Xref: csiph.com comp.std.c:6468 Pete Forman writes: > Keith Thompson 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 */