Sujet : Re: "A diagram of C23 basic types"
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.lang.cDate : 12. Apr 2025, 20:27:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vteev4$15a4i$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
User-Agent : Mozilla Thunderbird
On 4/12/2025 10:21 AM, David Brown wrote:
On 12/04/2025 07:43, Lawrence D'Oliveiro wrote:
On Thu, 10 Apr 2025 11:37:30 +0300, Michael S wrote:
>
So, IMHO, if C waits for C++ then it will wait forever.
>
Seems like C is already committed to avoiding incompatibilities with C++,
if the decision on thousands separators in numbers is anything to go by.
It has been committed to avoiding /unnecessary/ incompatibilities with C++ since C++ perhaps C99. The C and C++ committees will not introduce similar but incompatible features to each other unless there is very good reason to do so. The fact that some people think 1_000 is nicer than 1'000 is not nearly enough to pick a different type of digit separator for C.
My main annoyance is that ' is already used for character literals, so say:
0x123'A'BCD
The ' needs to be handled as special in the tokenizing, otherwise it would give 3 tokens 0x123 'A' BCD. Its use is also inconsistent with its use as a character literal.
Then again, maybe one could argue the same for '_', but at least:
* Already used by a number of other languages;
* Serves as a common spacer in identifiers;
* ...
Personally though, BGBCC supports both.
* Potentially, _ could be disallowed in C++ mode if needed, as the tokenizer is language aware (partly due to subtle differences in token rules).