Deutsch   English   Français   Italiano  
<vsl9sn$3vdjj$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: BGB <cr88192@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Thu, 3 Apr 2025 01:28:14 -0500
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <vsl9sn$3vdjj$2@dont-email.me>
References: <87y0wjaysg.fsf@gmail.com> <vsj1m8$1f8h2$1@dont-email.me>
 <vsj2l9$1j0as$1@dont-email.me> <vsjef3$1u4nk$1@dont-email.me>
 <vsjg6t$20pdb$1@dont-email.me> <vsjgjn$1v1n4$1@dont-email.me>
 <vsjk4k$24q5m$1@dont-email.me> <vsjlcp$230a5$1@dont-email.me>
 <vsjmdl$277bk$1@dont-email.me> <VsdHP.1828827$TBhc.1078002@fx16.iad>
 <vskjlo$34st8$1@dont-email.me> <20250402220614.431@kylheku.com>
 <85mscxlqnb.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 03 Apr 2025 08:29:44 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="139198c26bde0f3b3c9f73e3a85e9f69";
	logging-data="4175475"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX182tYNYjYKnHYknydRNWnRV0OjHVEqhdpQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gJSHQZn2mncp4bmEUB1sJWansNw=
In-Reply-To: <85mscxlqnb.fsf@nosuchdomain.example.com>
Content-Language: en-US
Bytes: 3555

On 4/3/2025 1:12 AM, Keith Thompson wrote:
> Kaz Kylheku <643-408-1753@kylheku.com> writes:
>> On 2025-04-03, bart <bc@freeuk.com> wrote:
>>> On 02/04/2025 17:20, Scott Lurndal wrote:
>>>> Muttley@dastardlyhq.com writes:
>>>>> On Wed, 2 Apr 2025 16:33:46 +0100
>>>>> bart <bc@freeuk.com> gabbled:
>>>>>> On 02/04/2025 16:12, Muttley@DastardlyHQ.org wrote:
>>>>>>> Meh.
>>>>>>
>>>>>> What's the problem with it? Here, tell me at a glance the magnitude of
>>>>>> this number:
>>>>>>
>>>>>>       10000000000
>>>>>
>>>>> And how often do you hard code values that large into a program? Almost
>>>>> never I imagine unless its some hex value to set flags in a word.
>>>>
>>>> Every day, several times a day. 16 hex digit constants are very
>>>> common in my work.  The digit separator really helps with readability,
>>>> although I would have preferred '_' over "'".
>>>
>>> Oh, I thought C23 used '_', since Python uses that. I prefer single
>>> quote as that is not shifted on my keyboard. (My language projects just
>>> allow both!)
>>
>> I made , (comma) the digit separator in TXR Lisp. Nobody uses _ in the
>> real world.
>>
>> I understand that in some countries, that is the decimal point.  That is
>> not relevant in programming languages that use a period for that and are
>> not localized.
>>
>> Comma means I can just copy and paste a figure from a financial document
>> or application, or any other document which uses that convention.
> 
> The comma couldn't be used in C without the possibility of breaking
> existing code, since 123,456 is already a valid expression, and is
> likely to occur in a context like `foo(123,456)`.
> 
> C23 borrowed 123'456 from C++ rather than 123_456 (which I would have
> preferred).  C++ chose 123'456 because the C++ already used the
> underscore for user-defined literals.  Apparently some countries, such
> as Switzerland, use the apostrophe as a digit separator.
> 

In my compiler, I did both ' and _, ...
Personally though, I prefer using _ as a digit separator in these scenarios.

But, yeah, can't use comma without creating syntactic ambiguity.