Deutsch   English   Français   Italiano  
<vsni9h$2gd4u$1@paganini.bofh.team>

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

Path: ...!weretis.net!feeder8.news.weretis.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.lang.c
Subject: Re: "A diagram of C23 basic types"
Date: Fri, 4 Apr 2025 03:05:23 -0000 (UTC)
Organization: To protect and to server
Message-ID: <vsni9h$2gd4u$1@paganini.bofh.team>
References: <87y0wjaysg.fsf@gmail.com>   <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> <vsl9sn$3vdjj$2@dont-email.me> <20250403121946.134@kylheku.com> <vsms75$1i8ud$1@dont-email.me>
Injection-Date: Fri, 4 Apr 2025 03:05:23 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2634910"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.3
Bytes: 3167
Lines: 54

bart <bc@freeuk.com> wrote:
> On 03/04/2025 20:37, Kaz Kylheku wrote:
>> On 2025-04-03, BGB <cr88192@gmail.com> wrote:
> 
>>> 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.
>> 
>> False; you can't use comma because of an /existing/ ambiguity.
> 
> Commas are overwhelmingly used to separate list elements in programming 
> languages.
> 
> They only become possible for numeric separators if you abandon any sort 
> of normal syntax and use one based, for example, on Lisp.

There is quite a lot of programming languages that have whitespace
separated lists.  Most of them have "Algol like" syntax.

> Even then, someone looking at your language and seeing:
> 
>     55,688
> 
> isn't going to to see the number 55688, they will see two numbers, 55 
> and 688,

You may get list of 3 things:

: [55,688] =>
** [55 , 688]


> because that is what is what they expect from a typical 
> programming language.

People should know language they use.  The whole point of using
a different language is because of some special features.  So
one should know them.

> Even when they normally use "," for decimal point, they're not going to 
> see 55.688 either, for the same reason.
> 
> In my view, comma is 100 times more valuable as a list separator, than 
> in being able to write 1,000,000 (which I can do as 1'000'000 or 
> 1_000_000 or even 1 million).

Whitespace actually may be quite good list separator.  But using
commas in numbers is too confusing, there are too many conventions
used when printing numbers.  My favorite is underscore for grouping,
1_000.005 has only one sensible meaning, while 1.000,005 and 1,000.005
can be easily confused.

-- 
                              Waldek Hebisch