Since the preference is local and/or personal, would it be better to do
this in the editor, adding separation on loading a Go source file and
removing it on save? It shouldn't be *too* hard to do it on all numbers
over a certain length, while avoiding comments and strings. I suppose it
would mess up column alignment sometimes. With such a tool one could even
go so far as to use 1,000,000.00 in the U.S. and 1.000.000,00 in Europe.
One would have to make sure that all *syntactical* commas are followed by
non-digits to distinguish them from decimal points / digit separators, but
that seems pretty natural to me. AFAIK gofmt already ensures that
syntactical commas are followed by whitespace anyway.

On Wed, Jun 22, 2016 at 3:21 PM John Souvestre <j...@souvestre.com> wrote:

> Ø  The grouping of digits in big numbers is not universal. Several
> different systems are in use globally.
>
>
>
> This is unfortunate, but I don’t see it as a show-stopper.  1000000 and
> 1_000_000 and 100_0000 would all be legal and result in the same value.
> Although I personally prefer groups of 3, I’d still consider groups of 4 to
> be more readable than no grouping at all.
>
>
>
> Besides, this is hardly the only locale issue.  I would think that being
> forced to use “.” instead of “,” (rather than the reverse) to separate the
> fractional part of a number is much more unsettling to some.
>
>
>
> I believe that the advantages of allowing “_” grouping exceed the
> disadvantages.
>
>
>
> John
>
>     John Souvestre - New Orleans LA
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to