Re: Hex string literals (was Re: C23 thoughts and opinions)

Liste des GroupesRevenir à cl c 
Sujet : Re: Hex string literals (was Re: C23 thoughts and opinions)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 18. Jun 2024, 06:39:49
Autres entêtes
Organisation : None to speak of
Message-ID : <87zfrizu56.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
On Mon, 17 Jun 2024 17:19:50 -0700, Keith Thompson wrote:
C23 adds the option to use apostrophes as separators in numeric
constants: 123'456'789 or 0xdead'beef, for example.  (This is borrowed
from C++.
>
Why not underscores, as supported in both Ada and Python?

And Perl, and probably other languages.

That would have been my preference, but C++ (starting in C++17)
and C (starting in C23) have already specified apostrophes.  C++
uses underscores as part of the syntax for user-defined literals,
also introduced in C++17.

The apostrophe is the standard thousands separator in Switzerland.
I don't know how much that influenced the decision in C++.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
14 Jun 24 * Re: C23 thoughts and opinions56Keith Thompson
14 Jun 24 +* Re: C23 thoughts and opinions12bart
15 Jun 24 i`* Re: C23 thoughts and opinions11David Brown
15 Jun 24 i `* Re: C23 thoughts and opinions10bart
15 Jun 24 i  +* Re: C23 thoughts and opinions5Lawrence D'Oliveiro
16 Jun 24 i  i`* Re: C23 thoughts and opinions4bart
16 Jun 24 i  i +- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
16 Jun 24 i  i `* Re: C23 thoughts and opinions2Chris M. Thomasson
17 Jun 24 i  i  `- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
16 Jun 24 i  `* Re: C23 thoughts and opinions4David Brown
16 Jun 24 i   `* Re: C23 thoughts and opinions3bart
17 Jun 24 i    +- Re: C23 thoughts and opinions1David Brown
17 Jun 24 i    `- Re: C23 thoughts and opinions1Michael S
15 Jun 24 +* Re: C23 thoughts and opinions3David Brown
15 Jun 24 i`* Re: C23 thoughts and opinions2Lawrence D'Oliveiro
16 Jun 24 i `- Re: C23 thoughts and opinions1David Brown
17 Jun 24 `* Hex string literals (was Re: C23 thoughts and opinions)40Keith Thompson
17 Jun 24  +* Re: Hex string literals (was Re: C23 thoughts and opinions)20David Brown
18 Jun 24  i+* Re: Hex string literals (was Re: C23 thoughts and opinions)18Keith Thompson
18 Jun 24  ii+* Re: Hex string literals (was Re: C23 thoughts and opinions)2Lawrence D'Oliveiro
18 Jun 24  iii`- Re: Hex string literals (was Re: C23 thoughts and opinions)1Keith Thompson
18 Jun 24  ii`* Re: Hex string literals (was Re: C23 thoughts and opinions)15David Brown
18 Jun 24  ii +* Re: Hex string literals (was Re: C23 thoughts and opinions)6Keith Thompson
19 Jun 24  ii i`* Re: Hex string literals (was Re: C23 thoughts and opinions)5David Brown
19 Jun 24  ii i `* Re: Hex string literals (was Re: C23 thoughts and opinions)4Kaz Kylheku
19 Jun 24  ii i  `* Re: Hex string literals (was Re: C23 thoughts and opinions)3Michael S
19 Jun 24  ii i   +- Re: Hex string literals (was Re: C23 thoughts and opinions)1bart
19 Jun 24  ii i   `- Re: Hex string literals (was Re: C23 thoughts and opinions)1Michael S
19 Jun 24  ii `* Re: Hex string literals (was Re: C23 thoughts and opinions)8Lawrence D'Oliveiro
19 Jun 24  ii  +* Re: Hex string literals (was Re: C23 thoughts and opinions)6David Brown
21 Jun 24  ii  i`* Re: Hex string literals (was Re: C23 thoughts and opinions)5Lawrence D'Oliveiro
21 Jun 24  ii  i +* Re: Hex string literals (was Re: C23 thoughts and opinions)3David Brown
21 Jun 24  ii  i i`* Re: Hex string literals (was Re: C23 thoughts and opinions)2Lawrence D'Oliveiro
22 Jun 24  ii  i i `- Re: Hex string literals (was Re: C23 thoughts and opinions)1David Brown
21 Jun 24  ii  i `- Re: Hex string literals (was Re: C23 thoughts and opinions)1James Kuyper
19 Jun 24  ii  `- Re: Hex string literals (was Re: C23 thoughts and opinions)1Keith Thompson
18 Jun 24  i`- Re: Hex string literals (was Re: C23 thoughts and opinions)1Lawrence D'Oliveiro
17 Jun 24  +* Re: Hex string literals (was Re: C23 thoughts and opinions)5Richard Kettlewell
17 Jun 24  i+- Re: Hex string literals (was Re: C23 thoughts and opinions)1Richard Kettlewell
18 Jun 24  i`* Re: Hex string literals (was Re: C23 thoughts and opinions)3Keith Thompson
18 Jun 24  i +- Re: Hex string literals (was Re: C23 thoughts and opinions)1Lawrence D'Oliveiro
18 Jun 24  i `- Re: Hex string literals (was Re: C23 thoughts and opinions)1Richard Kettlewell
17 Jun 24  `* Re: Hex string literals (was Re: C23 thoughts and opinions)14bart
18 Jun 24   +- Re: Hex string literals (was Re: C23 thoughts and opinions)1Keith Thompson
18 Jun 24   +* Re: Hex string literals (was Re: C23 thoughts and opinions)7Tim Rentsch
18 Jun 24   i`* Re: Hex string literals (was Re: C23 thoughts and opinions)6Michael S
18 Jun 24   i +* Re: Hex string literals (was Re: C23 thoughts and opinions)2bart
18 Jun 24   i i`- Re: Hex string literals (was Re: C23 thoughts and opinions)1Tim Rentsch
18 Jun 24   i +- Re: Hex string literals (was Re: C23 thoughts and opinions)1David Brown
18 Jun 24   i +- Re: Hex string literals (was Re: C23 thoughts and opinions)1Tim Rentsch
20 Jun 24   i `- Re: Hex string literals (was Re: C23 thoughts and opinions)1Lawrence D'Oliveiro
18 Jun 24   `* Re: Hex string literals (was Re: C23 thoughts and opinions)5Kaz Kylheku
18 Jun 24    `* Re: Hex string literals (was Re: C23 thoughts and opinions)4David Brown
18 Jun 24     `* Re: Hex string literals (was Re: C23 thoughts and opinions)3Richard Harnden
18 Jun 24      +- Re: Hex string literals (was Re: C23 thoughts and opinions)1Richard Harnden
21 Jun 24      `- Re: Hex string literals (was Re: C23 thoughts and opinions)1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal