-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Bug: Scientific notation should allow uppercase E #5164
Comments
Ok. |
BUG report. Code: C:>coffee --version C:>node --version |
@hsmyers You should open a new issue and actually fill out the template (not just open it and answer, put the information in the starting post as described) I think you should do that because your point is valid, in JS, |
Oh! Will do, first time ignorance and all that.
…On Fri, Feb 22, 2019 at 8:03 AM Philip Waritschlager < ***@***.***> wrote:
@hsmyers <https://github.com/hsmyers> You should open a new issue and
actually fill out the template (not just open it and answer, put the
information in the starting post as described)
I think you should do that because your point is valid, in JS, 1 + 2E-3
works, but in coffee fails.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5164 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5PvpwmpX2kQPCeAt7uF7Jd2AiAYx50ks5vQAasgaJpZM4bIgfw>
.
|
In 2012 uppercase E was deemed an anti-feature in #2060. The issue was originally opened because TC39 had deemed the octal constant I'd be interested in submitting a PR to allow |
It seems like this wouldn’t be a breaking change? Other than that I don’t really have an opinion on this; would people then want the other letters to be allowed as uppercase too? Part of CoffeeScript’s mission is to hide some of the bad parts of JavaScript, and |
It's a trivial change so I put together a PR for the team to accept or reject at their discretion. |
I'm opposed to uppercase letters in number literals for the abovementioned reasons. |
Choose one: is this a bug report or feature request? This is a Bug report.
Input Code
Expected Behavior
I expected a clean compile.
Current Behavior
coffee --map --bare --compile --output lib/ ./
C:\Users\hsmyers\Documents\LilyPond\mug\drop.coffee:65:21: error: exponential notation in '1.6E-100' must be indicated
with a lowercase 'e'
Z = math.complex(1.6E-100)
............................................^
Possible Solution
It would be better to accept either case as this would conform to both JS and normal scientific use patterns. It would also mean one less error message!
use of a case sensitive regex
modify the regex used to be case insensitive
Context
slight annoyance
Context is the normal give and take of the code/compile/deploy cycle.
Environment
The text was updated successfully, but these errors were encountered: