views:

429

answers:

4

Why in some countries there is a comma separator and in some dot? Do you know what is the reason of that? It's very annoying to check every time if you should use this or this.

+8  A: 

That's the way culture happens. Seriously, compared with other cultural issues (time zones, chronologies, left-to-right vs right-to-left and date formats spring to mind) this is a relatively easy one...

Life would certainly be easier if we'd built our world around what would make a developer's life sane:

  • One time system without the insanity (too many issues to mention)
  • One currency
  • One way of writing numbers, dates etc
  • One system of measurement
  • One relatively small character set (fitting in a single byte would be handy)
  • One mode of writing
  • One language

On the other hand, I think we'd miss a great deal of the richness of life that way...

Jon Skeet
Add "No Daylight Saving Time" to that list :)
BlaM
Removed the flippant comment, and added time stuff. Although I'd argue that the US took the word directly from *English* and changed the spelling back. It's not like American English came straight from Latin.
Jon Skeet
+10  A: 

I would suggest reading the Wikipedia entry on the history of the decimal separator. Basically, it boils down to different choices made when typesetting what was previously written by hand.

unwind
Thank you very much for this link. It seems to be obvious to answer "because this is like it is" but this Wikipedia entry seems to go deeper into this topic and explains the real answer to this question. Thanks again!
tomaszs
+3  A: 

For the same reason we have different languages, date formats, and that the US refuses to use the metric system, I'm afraid.

I live in Sweden, were the default separator for some reason is comma - and I think that is so utterly utterly stupid. :-( On the other hand, we use the date format yyyy-mm-dd, which is the logical way to represent dates since it is positional and therefore will string-compare directly when sorting! :-)

danbystrom
Actually the US has switched to metric already, but most of the country is very slow on the uptake :P
Artelius
+4  A: 

So don't. System.Globalization is your friend, use the NumberDecimalSeparator property. It's just another aspect of internationalisation, same as translating strings or anything else.

annakata