Large numeric litteral are hard to read
What language does this apply to? It applies to the Text Format Language.
Describe the problem you are trying to solve. I am currently writing big numbers in protobuf text format and it is pretty hard to read. That is why I would like to improve the readability.
Describe the solution you'd like I would like to have to support of underscores inside numeric litterals. e.g.:
- 250000 can be written 250_000
- 0xFFFEFFEF can be written 0xFF_FE_FF_EF
Of course, having it working with octal might also be useful for someone else.
Describe alternatives you've considered Since many other languages such as c++, rust, python, Toml implements _ inside numeric litteral I think it is one of the best solution for readability.
We've actually gotten a related proposal internally to add FieldOptions to specify how integers should be printed in text format that I think would be related to this case (although not specifically with the 250_000 type formatting). Let me follow up and see where that proposal landed.
I believe this is something we're unlikely to have capacity to staff ourselves otherwise though given priorities.
For consideration in #edition2024
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
Still considering for #edition2024
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.