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

Expend hexa decimal coverage with scientific notation #5942

Closed
ccoVeille opened this issue Jul 19, 2024 · 5 comments
Closed

Expend hexa decimal coverage with scientific notation #5942

ccoVeille opened this issue Jul 19, 2024 · 5 comments

Comments

@ccoVeille
Copy link

ccoVeille commented Jul 19, 2024

I open this issue following this.

Before, it wouldn't detect the _ and would spell check 0xbadc. Now it ignores things like 0xffff_eeee.

Originally posted by @Jason3S in #5934 (comment)

I only knew the classic notation for "thousand separator" for integer: 1_000_000 for example

But the format is wider than I thought

https://v8.dev/features/numeric-separators

Do you support the octal notation? Or is there no need because they are not using A-Z ? I assume it's the same for binary notation.

Did you ever face the exponential and also floating hexadecimal notation?

https://en.m.wikipedia.org/wiki/IEEE_754

https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/hex_float_literals.html

0xa.bp4
0xa.bp-4
0xF.FF

Or the complex (irrational) one?

https://docs.octave.org/v6.1.0/Numeric-Data-Types.html

0xBAi

Would you support it?

They may appear in scientific documents

@Jason3S
Copy link
Collaborator

Jason3S commented Jul 19, 2024

@ccoVeille,

The goal is not to identify hex digits per se, but to reduce false positives in the error reporting.

I haven't had anyone complain about odd hex float literals. On the other hand, I had run into the _ separator in JavaScript hex digits.

@ccoVeille
Copy link
Author

I assumed it earlier, otherwise you would have fixed a problem if you already faced it.

My point was to raise the point these existed.

Now, either

  • you knew them, but you never faced, so you don't expect to support them
  • you had no idea they existed, and now you might support them when someone will complain

I'm fine with everything, as now I know, you know 👍

That's why I reported the issue

@Jason3S
Copy link
Collaborator

Jason3S commented Jul 19, 2024

  • you had no idea they existed, and now you might support them when someone will complain

This is closest to reality. 😀
I didn't know about the _ in JavaScript either, because it isn't valid in C.

@ccoVeille
Copy link
Author

Haha.

I discovered it was a thing when a JavaScript developer that moved to Go used this notation in code I had to review.

I was like WTF. I had to look for it, and discovered Go supported it.

@ccoVeille ccoVeille closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants