News for hackers. Stuff that matters.
Re:Use of decimal point is 1.5 centuries older than historia... by samatman on Thursday February 22, 2024 @09:32AM (#39467609)
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.

Re:Use of decimal point is 1.5 centuries older than historia... by timc3 on Thursday February 22, 2024 @10:10AM (#39468214)
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.

Re:Use of decimal point is 1.5 centuries older than historia... by garaetjjte on Thursday February 22, 2024 @12:12PM (#39470028)
As opposed to being surprised that he was working with cross products? :)
Re:Use of decimal point is 1.5 centuries older than historia... by ReleaseCandidat on Thursday February 22, 2024 @10:23AM (#39468414)
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.

Re:Use of decimal point is 1.5 centuries older than historia... by heavenlyblue on Friday February 23, 2024 @05:04AM (#39478868)
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