32

Currently the network has a very inconsistent track record when it comes to injecting thousands separators in numbers >= 4 digits. Sometimes on the same page there will be commas in one element and not in another.

The primary advantage to using thousands separators is that it makes a number easier to read, at least for me.

The primary disadvantage is that it makes them harder to read for folks who use different languages or locales, where commas are actually decimals, and thousands separators may be decimals, spaces or other characters (or not even an existent concept).

I've seen arguments that the SE network should use comma separators because "the site is American" or because "English is the language of the Internet." I am not quite obnoxious enough to say I agree with either of those statements. And as a Canadian living in the United States, where arguments about m/d/y vs. d/m/y, gallons vs. liters and miles vs. kilometers have plagued me my entire adult life, it would be fantastic to have some consensus about this and to see some consistency implemented across the network.

I understand that localization efforts are in progress. But I still think it's a valuable discussion to have - should we force thousands separators, prevent them, or cater to the individual locale? The downsides to catering per language are (a) screen shots and other artifacts may still seem strange to users of different locales and (b) what if my computer is set to US-English but I would prefer not to see thousands separators? Perhaps the answer is to always use the shorthand (e.g. 5.4K, 137K) instead of listing out the entire number in some places but not others - then the discussion about separators becomes moot.

PLEASE NOTE: This is not a bug report about the individual cases where the use of thousands separators is inconsistent. There are plenty of those already, and if pluralization has taught us anything, it seems to be an unwelcome way of reporting the issues. I hope it is the intention for the localization efforts to push all number and other common formatting tasks through common functions to eliminate this chance for discrepancy.

This post is an attempt to discuss what the policy should be, in general, not to discuss individual instances of this inconsistency.

5
  • 3
    I vote for Maya numerals all over.
    – Mat
    Sep 23, 2012 at 18:56
  • @Mat Roman numerals would also be acceptable I think.
    – Aaron Bertrand Staff
    Sep 23, 2012 at 19:05
  • 2
    How about a very narrow space. I forget where I've seen it done, but it's nice.
    – AndrewC
    Sep 23, 2012 at 20:18
  • @Andrew, I don't know if screen readers read out those figures, in which case using spaces might confuse those? But that said, there doesn't seem to be any indication of the language in the page HTML either.
    – Arjan
    Sep 24, 2012 at 16:47
  • 1
    As always, it's not even as simple as . or , - some very populous regions of the world group the numbers differently: e.g. en.wikipedia.org/wiki/Lakh
    – unixsmurf
    Jan 19, 2014 at 11:42

4 Answers 4

17

Yes, in an English-language community: commas please.

The primary disadvantage is that it makes them harder to read for folks who use different languages or locales, where commas are actually decimals [...]

I don't see how getting people understand such formatting can do any harm, as surely such formatting is not unique to SE. (And there's not even any calculation involved, like to get from Fahrenheit to Celsius.) So, I'd say even the disadvantage is, on the long term, an advantage for all users.

I am Dutch, and we use dots for the thousands separator and commas for decimals, in Dutch text. But I would not expect Dutch notation in English text! I feel it's no problem to read different, expected, formats at all. Even more, using localized numbers in English text is really confusing: what does 1.001 mean when I am not sure it might be using a localized notation?

I know regional preferences might not be the same in all places where English is spoken.

10
  • 1
    I suppose you're right that on this site there are no places that I know of where a number could be a decimal. But I still disagree with the notion in general that we should force our formatting standard on the world. This is the same attitude that leads to problems with transposed dates - "oh the user who entered that date was American, so they must have entered September 8th instead of August 9th." In order, I would be in favor of (a) not using any formatting, (b) formatting per locale, and (c) forcing commas everywhere. I don't expect everyone to agree with me, of course. :-)
    – Aaron Bertrand Staff
    Sep 23, 2012 at 19:28
  • 1
    @Arjan, good (decimal) point Sep 23, 2012 at 19:28
  • My order would be c, a, c :-) And even in many figures, I guess we'd have two decimals, not three, @Aaron. And of course, I would object to "forcing" some format on random websites, but on sites like SE I think it's fair to expect a user to understand that the formatting might be English.
    – Arjan
    Sep 23, 2012 at 19:33
  • @Arjan where did I say we'd have three decimals?
    – Aaron Bertrand Staff
    Sep 23, 2012 at 19:34
  • You didn't, @Aaron. But seeing 1,200 or 1.200 would easier both be taken for thousands than seeing 1,20 and 1.20. Hence, I feel visitors who're open to seeing non-locale formatting won't easily get confused by seeing the English formatting.
    – Arjan
    Sep 23, 2012 at 19:35
  • Ah, you meant decimal places. I guess that depends. For someone who is a veteran here, it really isn't going to matter. For someone who is new here, and hasn't quite mastered what all the numbers mean, how would they know if the site owners liked to express those numbers to 2 decimal places or 3 decimal places? Are you seeing enough cases of 4+ digit numbers where forcing this formatting will truly help you?
    – Aaron Bertrand Staff
    Sep 23, 2012 at 19:37
  • Okay, underscores it is, @Aaron! And I know few have been wondering about the comma (like in the reputation graph) -- but they have learned something useful, if only for the next time they order something online ;-) And I also understand what people mean when writing "i", "u" or "thx", but it just makes me itch!
    – Arjan
    Sep 23, 2012 at 20:11
  • (Also, @Aaron, please downvote now -- you don't need to be afraid of a pity upvote at this moment, and I know how voting works here!)
    – Arjan
    Sep 23, 2012 at 20:13
  • @Arjan I'm not sure where I sit on this issue yet. You have good arguments but I want to make sure I play devil's advocate and represent folks who may not be participating here on meta at all.
    – Aaron Bertrand Staff
    Sep 23, 2012 at 20:15
  • 1
    for what it's worth, i could only find one country (Canada) whose official language is English and whose localized number formatting conventions are different from the US/UK. May 22, 2020 at 18:18
4

Currently, the biggest crime is the lack of consistency. In my opinion, all numbers displayed on the network should be subject to one of two formatting rules: a "short" version and a "long" version.

The short version would be the 13.1K style, perhaps limited to three significant figures. The longer version would be the complete value, subject to thousands separators (13,101).

This design would centralise the code responsible for formatting numbers and would be the ideal place to support localisation, if that's the route the network is taking.

In the short term, the US locale could be used (because that's already present in many parts of the site).

3
  • 3
    One might argue for a thin space rather than a comma: gives the same benefit but is less culturally specific.
    – Richard
    Jan 19, 2014 at 9:59
  • 1
    @Richard although the space (vs comma) might be more prevalent globally, the comma is almost universally used by countries whose official language is english. and as Arjan said in his answer, it is uncommon to use the localized number format when writing in a language that is not the localized language. May 22, 2020 at 18:55
  • I've checked my copy of the Oxford Manual of Style (as used by Oxford University Press): in technical contexts (which this certainly is): use a thin space.
    – Richard
    May 22, 2020 at 20:52
-2

I can follow the argument to use the US locale, since StackExchange originates from the US, however it is an inconsistent argument. From what I have on the websites seen people mainly use the metric system and dates are in inconsistent formats, mainly DMY.

Considering these two points, using the US local would be highly cumbersome, as the metric system and the DMY format are more standard. Please correct me if I'm subjective here, but as far as I know most areas of science use the metric system as standard because of its simplicity. And the date format DMY is just objectively way more wide spread than MDY.

So why should the argument of the US locale suddenly apply for the decimal separator? About how widespread the two versions are, there is no clear winner. From a short read of the Wikipedia site while the comma as decimal separator is used in more countries, the dot is probably used by more people (no numbers on the page, but simply by the fact that it is used in China and India, I assume it wins on amount of people).

I suggest the StackExchange network goes with the SI standard, which states "The symbol for the decimal marker is either a point or comma on the line". As long as it is consistent in a specific question, it should not lead to any confusion (unless you are not used to, for example the . as decimal separator, but that confusion would also be there with the US locale as standard).

Also an option would be, not to use the thousand separator until needing it at least twice, at that point (pun intended) it is obvious that it is not the decimal separator. For less than 7 digits, numbers are still readable without it. But that is very subjective.

6
  • 1
    Where does the site use DMY as date format? And I'm not sure how the SI standard that you cite is going to resolve the discussion.
    – rene
    Feb 1, 2019 at 12:46
  • @rene I said people use the DMY as date format, not the site. The site uses the MDY format. And I don't mind the site using the dot as decimal separator, as an US site that is logical. But people asking are not necessarily from the US. I understand that my solution is not perfect, but this problem is difficult and the SI standard is the resolution to this discussion on international standard level by a committee getting paid for this kind of stuff. If they couldn't do better, would be arrogant to say we could.
    – findusl
    Feb 1, 2019 at 12:51
  • 1
    The site doesn't use MDY, at least not in a numeric format. The site uses almost ISO 8601 format for dates although most dates and times are represented relative to NOW(). The resolution of the SI standard is useless as it offers two options you can pick from. It doesn't make it clear at all. Those people in that committee might be paid for but in this particular case it is a waste of money. I hope they'll pay it back so it can be spend on more useful standards.
    – rene
    Feb 1, 2019 at 13:51
  • @rene I don't know what you see, but to me every other answer to this question and most answers older than a specific time use the MDY format. This format simply states that first month, then day then year. MDY doesn't specify whether numeric or not and it doesn't specific any separators between those or anything like that. Your disappointment with the SI standard is understandable, but please consider that it is not always possible to just say one thing is right and another is wrong. Extremismus is rarely the ethical answer.
    – findusl
    Feb 1, 2019 at 14:02
  • I've never ever it considered to be a problem that the dates are written here as they are, despite they are not in a locale I'm used to. So it looks like we now settled on: a decimal separator is adviced (per committee) and now we have to spend another 6 to 8 to decide which one it will be, comma or dot.
    – rene
    Feb 1, 2019 at 14:09
  • @rene why do we have to decide? You don't seem to mind the different date formats used by different people on this site, why mind different decimal separators. I mean I understand your disappointment in an international standard not actually standardising either of them, but as with the date formats, on this site we don't actually need to standardise it.
    – findusl
    Feb 1, 2019 at 14:13
-4

Statistics such as:

viewed 727145 times
viewed 270866 times
viewed 813541 times
viewed 35030 times
viewed 311031 times

Can definitely use a comma for readability (look closely at the last two examples).

4
  • 2
    This "answer" seems to me like it was supposed to be an upvote on the question or one of the answers.
    – Lix
    Jan 19, 2014 at 9:34
  • I am not sure if meta.so is a "question/answer" website.
    – Salman A
    Jan 19, 2014 at 9:39
  • 7
    I agree with you that meta is a strange beast... But all sites (even meta sites) follow the Q&A format. People have suggested adding a comma - people have expanded on that suggestion - all you're doing here is agreeing with what has already been said. What I'm trying to say is that this answer doesn't really add anything to the discussion.
    – Lix
    Jan 19, 2014 at 9:42
  • It is now. Jun 7, 2017 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .