Hacker News new | past | comments | ask | show | jobs | submit login

More important question: comma or period?

:)




I'd propose a compromise. Euros switch to decimal point and Americans to metric system. Win-Win.


Windows South African regional settings used to use a period before changing it in Windows 8 to use a comma.

Total mess while we had a mix of Windows 7 and Windows 8+ developer machines.

I don’t even know why Microsoft changed it, my theory is that some idiot academic or government worker reported to Microsoft that “officially” we use a comma, with zero regard for the fact that practically everyone used a period. Total idiot.


In general I support countries maintaining their language-specific quirks, but I would encourage the decimal-comma countries to lose that habit.

A few reasons: programming languages have universally settled on '.', numbers frequently end up in CSV files, and languages can't really support both standards, because of the usual function notation `f(a, 100.5, "c")`, a comma would be ambiguous here as it would be in a CSV. It's difficult and error-prone to interoperate between decimal period and decimal comma, and the former has only advantages over the latter.

Basically, it creates problems which no one needs. I don't consider this to be a case of cultural chauvanism, it's just that it so happens that the English-speaking countries chose the more useful representation when it became time to program computers. Separating arguments and expressions using a comma is much more natural than using a full stop would be, and this can't be parsed in tandem with a decimal comma.

You can't really count this as a win for the English way of doing things, which predates computer programming, the only context in which the difference actually matters. Before that, it was an arbitrary distinction, now it's not.


I completely agree.

Having moved to Sweden and from the '.' to the ',' what is even more confusing is then the thousand separator is switched around. Add to the confusion where a banking interface sometimes itself switches between the two and is not consistent what am I transferring.

But the thing that really got me was in Sweden my 9 year old wasn't even using the comma separator in his maths book it was the dot operator `·`. How confused was I that a 9 year old was working with dot products.


As opposed to being surprised that he was working with cross products? :)


Also suggest US switches from crazy Month/Day/Year date formatting.

> it's just that it so happens that the English-speaking countries chose the more useful representation when it became time to program computers

English-speaking countries basically invented CSV so chose the symbols used in CSV files such that they work well with their way of writing numbers saved in these CSV


CSV with floats that use commas as decimal separator uses semicolons (well, it should be called SSV) or sometimes tabs (TSV, which actually is an official name).

Practically, all 3 versions need to be supported. But the actual problém (well, one of many problems of CSV) are non-quoted strings with commas or semicolons.


I'd like to understand where this difference originates from. It can be very confusing working with Germans (for example).


Wikipedia has a quite detailed history section: https://en.m.wikipedia.org/wiki/Decimal_separator


the answer is the same as tabs or spaces


It’s not so arbitrary. I’ve grown up in a country which uses commas, but it’s still really confusing even to me, when writing e.g. f(1,2). Is that function applied to 2 arguments or 1? For this reason I always use period as decimal point.


I'd say: Spacing matters, f(1,2) is different from f(1, 2). Just use a semicolon to separate the numbers, e.g. f(1,2; 2).


Maths is typically written fast, so subtle spacing is too weak a signal to distinguish meanings. Where I studied maths, we even crossed our zeds horizontally to make it easier to distinguish from carelessly written 2s. Similarly, even though the country uses commas, the uni uses periods, for the benefit of clarity. Almost noone uses semicolons in function application in writing.


If everybody did that, we'd wouldn't have Zoozve...


> the answer is the same as tabs or spaces

Not when—as a sibling comment notes—you're dealing with CSVs.


don't forget about TSVs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: