-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
breakingThis change will break codeThis change will break codeparserLanguage parsing and surface syntaxLanguage parsing and surface syntaxspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Description
The most obvious two changes would be:
- disallow
0as a juxtaposed numeric literal coefficient:0nwould be a syntax error. - disallow juxtaposition of floating-point numeric literals with trailing
.:1.xwould be a syntax error.
There may be others but these two strike me as clearly a good idea. One nice thing about disallowing 0 as a juxtaposed numeric literal coefficient is that it opens up as many 0x1234 syntaxes as one might ever want, so it kind of future-proofs us for that. Another nice thing is that instead of getting a surprise when they try 0x after 0y just working, people will get a warning as soon as they try 0y and they can immediately learn that 0 doesn't work as a juxtaposed numeric literal coefficient.
nalimilan, iamed2, rofinn and dpsanders
Metadata
Metadata
Assignees
Labels
breakingThis change will break codeThis change will break codeparserLanguage parsing and surface syntaxLanguage parsing and surface syntaxspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative