elves / elvish

Powerful scripting language & versatile interactive shell

Home Page:https://elv.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support localization such as adding thousand separators to formatted numbers

krader1961 opened this issue · comments

I just posted a comment to the chat channel that included a program illustrating the power of exponential growth. The output of the program would be easier to understand if the numbers included thousand separators so that values like 21474836.47 would appear as 21,474,836.47 (at least if you are in an English locale). It appears the recommended way to produce such output is to use the https://pkg.go.dev/golang.org/x/text/message package. So I'm opening this issue to see what people think about adding a dependency on that package. Note that I haven't yet measured how much adding that dependency increases the size of the Elvish binary. Obviously adding such a dependency is a non-starter if it greatly (whatever that means) increases the size of the Elvish binary. But I'm more curious if people think this would be useful if the increase in size was modest.

P.S., This is related to issue #1007.