Liste des Groupes | Revenir à cl c |
On 02/04/2025 17:20, Scott Lurndal wrote:C++ uses single quotes - it is much more natural for C to copy C++ than to copy Python.Muttley@dastardlyhq.com writes: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!)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 "'".
That fact that it is not widespread is a problem however, so I can't use either without restricting the compilers that can be used.Surprisingly enough, this new C23 feature is only available when using C23 or later.
For example gcc 14.x on Windows accepts it with -std=c23 only; gcc on WSL doesn't; tcc doesn't.
Les messages affichés proviennent d'usenet.