Deutsch   English   Français   Italiano  
<vskaas$2rit9$1@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: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Wed, 2 Apr 2025 23:31:07 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <vskaas$2rit9$1@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 02 Apr 2025 23:31:08 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="623bc8109ef6a19047fd0ab09fa9e78d";
	logging-data="3001257"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18NKuRad1yqY1DddL8seWMh"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:3r6XXNq1+7GrSJ5ufdFg8R9+rdg=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <VsdHP.1828827$TBhc.1078002@fx16.iad>
Bytes: 2946

On 02.04.2025 18: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.

I can't tell generally; it certainly depends on the application
contexts.

And of course for bases lower than 10 the numeric literals grow
in length, so its usefulness is probably most obvious in binary
literals. But why restrict a readability feature to binary only?

It's useful and it doesn't hurt (WRT compatibility).

> 
> 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 "'".

Obviously a question of opinion depending on where one comes from.

I see a couple options for the group separator. Spaces (as used in
Algol 68) are probably most readable, but maybe a no-go in "C".
Locale specific separators (dot and comma vs. comma and dot, in
fractional numbers) and the problem of commas infer own semantics.
The single quote is actually what I found well suited in the past;
it stems (I think) from the convention used in Switzerland. The
underscore you mention didn't occur to me as option, but it's not
bad as well.

Janis