-
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
++ -- operations bug #1352
Comments
CoffeeScript is stricter about whitespace between operators and operands than JavaScript is; this is the price of implicit parentheses. How, for instance, would you interpret
? It could either be a syntax error, or Similarly, a frequent complaint that |
The same rule as |
Hi Trevor, Good point. afaik they don't have ++ in ruby for the same reason. But, maybe it could be handled at least in those cases where it's pretty much clear what's going on, kinda like that
If it's not too much of a trouble |
@satyr When you say of
what do you mean? Are you saying that |
The same rule we use to enable |
That last one does not have an obvious compilation. Both |
The former doesn't make sense as |
That's not necessarily true. It's valid ECMAScript that will almost always throw a runtime error. If a JS parser will parse it, we should be allowed to output it. There's no reason we should be able to write |
You mean, you know a case that
Allowing expressions that will only cause runtime errors benefits nobody. Accepting things like |
No, I only meant to say that it was possible. You've given a convincing argument, though, and I now agree that compiling to |
Hi,
It seems there is a bit of an issue with the
++
and--
operations when there is a space between a variable and the operationProbably both versions should be supported
Cheers
The text was updated successfully, but these errors were encountered: