-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
syntax confusion: 1.+2
#19089
Comments
+1 for eliminating The second point, allowing |
given that |
Disallowing |
I agree with Jeff even though I personally dislike |
At this point everyone seems to agree that |
R accepts it, as do octave/matlab, bc, and most lisps/schemes. The syntax is nearly universal. |
Whilst we're at it, are there any problems with omitting the leading zero: |
There seem to be a lot fewer issues with that syntax. |
For 0.6 this should be made a deprecation warning or an error, but this change is pretty minor and low impact, so I'm leaving this as up for grabs in case someone wants to do it. |
Hi @StefanKarpinski , |
@akaysh: anyone who wants to can work on it (no need to ask permission), but I suspect this is not a particularly easy issue. It requires some deep hacking on Julia's parser, which is written in Scheme. But if you think that sounds doable, you're welcome to give it a shot. |
(Perhaps due to dot-ops presently having the dot on the left rather than right?) |
This sort of confusion keeps cropping up: https://groups.google.com/forum/#!topic/julia-users/aycsd2iAktE. Two possibilities seem possible:
1.
as a short syntax for1.0
;1.
but make ambiguous cases like1.+2
a syntax error.Related: #18714 – in that it also relates to making potentially ambiguous cases errors.
The text was updated successfully, but these errors were encountered: