Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow Underscore in Numeric Literals Again #337

Open
macdjord opened this issue Aug 24, 2024 · 1 comment
Open

Feature Request: Allow Underscore in Numeric Literals Again #337

macdjord opened this issue Aug 24, 2024 · 1 comment

Comments

@macdjord
Copy link

YAML 1.1 allowed numeric literals, i.e. ints and floats, to include underscores, which were semantically ignored. They could thus be used for digit grouping in long values, much as commas are often used as thousands-separators in human-readable text. This was very convenient, and greatly improved readability for large values.

YAML 1.2.0 dropped this feature, for no reason I can find documented anywhere.

I propose that YAML 1.3 bring this feature back.

@KJTsanaktsidis
Copy link

I believe the reason is so that the regular expressions for implicit resolution of !int and !float match the JSON rules, since the aim of YAML 1.2 was to be a strict superset of JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants