Liste des Groupes | Revenir à cl c |
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.
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,
because that is what is what they expect from a typical
programming language.
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).
Les messages affichés proviennent d'usenet.