dfinity / motoko-base

The Motoko base library
Apache License 2.0
481 stars 100 forks source link

Add `format` to Integral types, similar to Double.format and SML's Int.fmt functions. #110

Open crusso opened 4 years ago

crusso commented 4 years ago

Most of this is already implemented in the prelude so its just a matter of exposing it properly, I think.

ehoogerbeets commented 4 years ago

No, please DO NOT add that! It will be English only that way. Implement a separate formatter that formats based on the locale and make posix/C or English/US the default locale for now. Now's your chance to make an international friendly language instead of falling into the same old trap that all previous programming languages have...

rossberg commented 4 years ago

@ehoogerbeets, this is supposed to generate Motoko number syntax, so language does not affect it. There is plenty of room to add i18n support to the platform, but that's different functionality.