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

Disallow Uppercase Radix Prefixes? #2060

Closed
jashkenas opened this issue Jan 20, 2012 · 10 comments
Closed

Disallow Uppercase Radix Prefixes? #2060

jashkenas opened this issue Jan 20, 2012 · 10 comments
Labels

Comments

@jashkenas
Copy link
Owner

There's seems to be some agreement in TC39 that the uppercase forms of radial prefixes are undesirable in general, despite the longstanding existence of 0Xffc...

https://mail.mozilla.org/pipermail/es-discuss/2012-January/019735.html

Since CoffeeScript has no such obligation to JavaScript backwards-compatible syntax, should we simply remove uppercase radix prefixes from the language, only leaving: 0b..., 0o... and 0x... ?

@paulmillr
Copy link

never seen them used anywhere in any language, so 👍

@michaelficarra
Copy link
Collaborator

+1. I hated adding 0O... for consistency with 0X... and 0B.... Let's remove them all.

@jashkenas
Copy link
Owner Author

Great -- feel free to patch and merge then, if anyone has a minute to take a crack at it.

@geraldalewis
Copy link
Contributor

I think I can handle this right after lunch, unless anyone's already done it?

@geraldalewis
Copy link
Contributor

Hmm... What about exponents? 10E2 I say no uppercase allowed there either, for consistency's sake.

@jashkenas
Copy link
Owner Author

Yep.

geraldalewis added a commit to geraldalewis/coffee-script that referenced this issue Jan 20, 2012
@satyr
Copy link
Collaborator

satyr commented Jan 20, 2012

What about hex A to F? Are we restricting them to lower (or upper?) case as well?

@geraldalewis
Copy link
Contributor

What about hex A to F?

I use them, occasionally, precisely because they're not subtle. I have three instances of capitalized hexes in code I wrote just today (magic numbers for parsing font binaries).

OTTO = 0x4F54544F

csa  = 0xB1B0AFBA - checksum

@jashkenas
Copy link
Owner Author

Yeah, I think leave hex A-F either way would be fine.

jashkenas added a commit that referenced this issue Jan 21, 2012
Issue #2060 Disallow uppercase radix prefixes and exponential notation
geraldalewis added a commit to geraldalewis/coffee-script that referenced this issue Jan 21, 2012
@geraldalewis
Copy link
Contributor

ping @michaelficarra (this can be closed, no?)

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

No branches or pull requests

5 participants