

Rant: Why no commas? - mchahn

I have been using computers for many years and I always assumed output would become easier to read.  But I still see numbers like 69882139 everywhere.  How am I supposed to know if it is approximately 7e6, 7e7, or 7e8?  What is wrong with showing 69,882,139 or 69.882.139?  And why don&#x27;t all languages allow this syntax in constants?  It is just as hard to type it in correctly as it is to read it.
======
b6
Lately I noticed that Ruby and Java both permit underscore in numeric
literals.

As to why it wasn't there before, or why it isn't available everywhere, I'm
not sure, but I suspect the answer is basically lexing/parsing difficulties.

------
Tomte
I can tell you what's wrong with 35,798: it's less than fifty, even if you
don't parse it that way.

But as b6 said, some languages support grouping of digits, but they use
another symbol, usually _.

Ada would be an example.

