3 ms·
This issue can be avoided by following the ISO standards ISO-31 and ISO-80000-1. Under these grouping is done by separating groups by a small space (U+2009, THI
by tzs 9y ago
This issue can be avoided by following the ISO standards ISO-31 and ISO-80000-1. Under these grouping is done by separating groups by a small space (U+2009, THIN SPACE, is usually used, I believe). If there is a period or comma in the number, it is then unambiguously the decimal separator.
We should even already be used to that style, because those are the standards that cover how SI units are supposed to be written.
So just write it as 10 000% and everyone should be happy.
- tome 9y agoAh yes, I'll just press the " " key on my keyboard instead of the "," key :)
- DonHopkins 9y agoYou'll love Apple's smart new "Touch Space Bar", which lets you continuously adjust the width, style and semantics of Unicode spaces from zero width, hair thin, various EM&ENs, to obesely fat, pregnant pause, breaking, non-breaking, numeric, oghamic, figure, ideographic, word, punctuation, visible, ␠ symbols, mathematical, poetic, scientific, pseudo-scientific, streaming, auto-repeat, lossless and lossy compression, deep, personal, safe, digital rights management, Mongolian vowel separators [1], etc, simply by swiping, tapping, crossing and snapping your fingers, while watching the mesmerizing colorful blinking graphical feedback provided by applications supporting the NSTouchSpaceBar API. Microsoft also has a dog in the space race: see their "Space Characters Design Standards". [2] [1] https://www.cs.tut.fi/~jkorpela/chars/spaces.html https://www.cs.tut.fi/~jkorpela/chars/spaces.html [2] https://www.microsoft.com/typography/developers/fdsspec/spaces.htm https://www.microsoft.com/typography/developers/fdsspec/spac...
- tome 9y agoThis is the best comment I've read all day, and I've been reading some good ones about The Google Memo™. EDIT: Do yourself a favour and read DonHopkins's history. You'll have a good laugh. EDIT2: That edit wasn't meant for you, Don.
- pluma 9y agoOr you could be obnoxious and use the syntax that made its way into the EcmaScript standard: 10_000
- majewsky 9y agoNice to see some Perl lineage popping up in JavaScript.
- bakli 9y agoIs that where Ruby took it from?
- mahmud 9y agoNo, they both got it from Common Lisp (ca 1984)
- xenophonf 9y agoIs that a Common Lisp thing or something that predates the ANSI standard? SBCL doesn't like that syntax: * 10_000 debugger invoked on a UNBOUND-VARIABLE: The variable |10_000| is unbound. According to the Common Lisp HyperSpec, "_" is an alphabetic constituent character: http://www.lispworks.com/documentation/HyperSpec/Body/02_ad.htm#possiblesyntaxtypes http://www.lispworks.com/documentation/HyperSpec/Body/02_ad.... http://www.lispworks.com/documentation/HyperSpec/Body/02_adb.htm#constituenttraitsofstdchars http://www.lispworks.com/documentation/HyperSpec/Body/02_adb...
- kazinator 9y agoRather, perhaps, Ada 83.
- pluma 9y agoI think the syntax in JS actually allows putting them at arbitrary points, e.g. 1_00_0 or 10_00 (both being identical to 1000).
- baby 9y agoThat's what french people do :P, we would write 10 000%. Anyway this issue could be avoided by saying 101 time increase
- coldtea 9y ago>So write 10 000% and everyone should be happy. I wouldn't. This looks totally bizarro to me.
- dbbk 9y agoI've genuinely never seen someone write that in my life before.
- icebraining 9y agoSpaces as decimal separators are pretty common over the world: https://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use https://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use
- coldtea 9y agoLiterally NO country in the table you've linked to uses spaces as decimal separators.
- icebraining 9y agoSorry, mind slip, I meant "thousands separator".
- coldtea 9y agoOK, some do in this table, but I'm not sure how accurate it is. It lists my country as one of those countries, and we definitely don't use space as thousands separator (we use period). Perhaps what the table shows is just that this is the "SI style", and assumes that countries whose scientists and units follow the SI also follow this way of thousands separators, but we don't. We just use the SI units -- and even our scientists use period for the separator.