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

Idea: parsing option to emit only `Float values for numbers #83

Open
cemerick opened this issue Jul 24, 2019 · 2 comments
Open

Idea: parsing option to emit only `Float values for numbers #83

cemerick opened this issue Jul 24, 2019 · 2 comments

Comments

@cemerick
Copy link
Contributor

Insofar as many (some?) applications consuming JSON are at peace with presuming floats everywhere (given the Javascript heritage), an option to only ever emit `Float values for numbers (and never `Ints) would be helpful to simplify pattern matching, etc.

@Leonidas-from-XIV
Copy link
Member

It could be done as another CPPO branch, like FloatSafe, though personally I am worried about the combinatorial explosion of different variants.

That said, it would maybe make sense to remove some of the unused variants for 2.0, if we're going to break compatibility in lots of tiny ways.

@mjambon
Copy link
Member

mjambon commented Dec 19, 2019

Having converters from one AST type to another could be handy. This would allow adding new AST types without more cppo madness.

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

3 participants