Re: Using C23 digit separators not locale digit grouping characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-02-08 14:06, Alejandro Colomar wrote:
Hi Jakub!

On 2/8/23 22:00, Jakub Wilk wrote:
* Tom Schwindl <schwindl@xxxxxxxxx>, 2023-02-03 13:27:
I wonder if I'm the only one who thinks that the digit separators look
irritating for both, hex and octal.

Not only you.

I think C23's choice of separator is particularly bad. I found underscores
(used in Perl, Ruby, Python 3, Java, Rust, and likely many others) more
palatable.

IIRC, that was suggested at some point for C23, but don't remember; maybe it's a glitch in my memory (I think it was suggested for separating binary (0b) input).  I can't understand how they chose ', especially when in some countries it's used as the decimal point  (I don't know if that's official, but I've seen it in hand-written text quite often here in Spain).  I agree that it's probably one of the worst separators they could have chosen.

Do you think we should use an underscore in the manual pages?  Or what would you do?

See discussion 10 years ago in WG21 C++:

	https://open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3499.html

where ambiguity with C++ user-defined literal unit operators and "_" was an issue, and Objective C/C++ parsing problems with using whitespace.

So in 2020 WG14 C, opting for compatibility with WG21 C++; quoting:

	Prior Art: C++, Intel ICC, EDG, Microsoft Visual Studio
in
	https://www.open-std.org/JTC1/SC22/WG14/www/docs/n2606.pdf
	https://www.open-std.org/JTC1/sc22/wg14/www/docs/n2626.pdf

FYI see comment in:

	https://thephd.dev/c-the-improvements-june-september-virtual-c-meeting

"Guess who uses apostrophes for digit separators! The SWISS! And who is in Switzerland? ISO! I see WG14 is no less corrupt than WG21.
	— Miro Knejp"	;^>

We are going to be seeing these used a lot in future from GCC , and as man-pages are immersed in a sea of C, we might as well start getting used to it, which is why I made that suggestion.

--
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux