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

Current state of ints and floats #4499

Closed
pbiggar opened this issue Sep 26, 2022 · 1 comment
Closed

Current state of ints and floats #4499

pbiggar opened this issue Sep 26, 2022 · 1 comment

Comments

@pbiggar
Copy link
Member

pbiggar commented Sep 26, 2022

I did some work on improving ints and floats, especially converting them from partials and supporting negatives. This issue describes the remaining work to do.

Negatives are supported in expressions but not patterns.

In patterns, if you have a variable with an int in it (x2), you can delete chars until you get an int (2) but it's a variable not an int!

Floats are allowed be not fully filled in (eg 0., or .0) but there's no consistency: sometimes they're partials (when typing), sometimes they stay as floats (when backspacing).

I think it would be good to fixup these weird-but-allowed representations when users click away from a handler (as opposed to disallowed which are fixed and reported).

I think to would be good to use partials for edge cases in ints and floats as well:

  • too big ints (right now these are converted to the max int64, which is weird)
  • just a "-"
  • just a "."
  • this would mean introducing a pattern partial
@pbiggar
Copy link
Member Author

pbiggar commented Mar 1, 2023

Closing as it doesn't apply to darklang-next

@pbiggar pbiggar closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
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

1 participant