4 ms·
I actually like this, and had decided that single quotes were a good digit separator even before C++ adopted it. I had a calculator, an HP, I think, that used s
by rootbear 11y ago
I actually like this, and had decided that single quotes were a good digit separator even before C++ adopted it. I had a calculator, an HP, I think, that used single quotes as digit separators in the LCD display. There is actually a locale that uses single quotes: de_CH, the Swiss High German locale. There are no locales that use underscore as far as I know. I have a few aliases like this:
alias dfk='LC_NUMERIC=de_CH df --block-size=\'\''1024'
alias duk='LC_NUMERIC=de_CH du --block-size=\'\''1024'
that help me when something like du -h won't do.
Also, the underscore is used to separate words in variable names, where it is significant.
int my_long_var_name, mylongvarname;
are different variables. But in numeric constants, the underscore has no meaning.
186_282.397 and 186282.397
would be the same number. This is inconsistent.
Finally, in a variable width font, the single quote is much less visually intrusive than the underscore, which tends to be a wide character.
I would like to see this form used universally. In my wildest fantasies, I'd also allow either '.' or ',' as the decimal indicator. That would make some of my European friends happy.