-
-
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
Package breaks 0n 0.5 with a " invalid iteration specification" #17668
Comments
It should be @JeffBezanson, do you know what PR changed this behavior? It should be listed under "breaking changes" in the NEWS in any case. |
I resisted years to Matlab trying to convince me to drop the parentheses. Call it old fashion but I like wrapping fors and ifs with parentheses. What is the need to do such a needless breaking compatibility? |
The parentheses are C syntax. It's usually a bad idea to force the syntax from one language on another. When in Rome.... |
Changed by 8d76566, but this aspect of the change was not intentional. |
I feel fairly strongly that the iterator part of a for loop should not be allowed to be parenthesized. The implicit theory behind allowing that is that the |
And I feel sad that an ages old principle of "use parentheses freely to increase readability" has been dropped in favor of a ... I don't know what. |
While I don't have strong feelings one way or another, I agree with Stefan that this situation is different from allowing parentheses around expressions. It is however the same as a binding in let, so it needs to be consistent with:
|
Not in Lisp, one of the oldest programming languages :) |
I also don't have strong feelings about this, but I will emphasize again that this was not a deliberate decision, so it's a bit overwrought to talk of dropping age-old principles or whatnot. |
We usually do try to go through deprecation periods for as many of these things as we can, when they are intentional decisions (like |
"Not in Lisp, one of the oldest programming languages :)" And who said Lisp is readable anyway? :) Sorry if it sound a bit hash and yes I understand that it was unintentional but from Stephan's reply it's pretty much looks like that it's here to stay. |
If we can change it from an error to a deprecation (or maybe allow it to continue to work?) then I think we should. |
Jeff, can this be fixed or turned into a deprecation warning, or should it be added to NEWS as an accidental breaking change? |
There is no ancient principle of "stick parens wherever you like, it will mean the same thing". What there was and still is is the fact that parenthesizing a complete expression does not change it's meaning. The iteration part of a We should:
I'm in favor of the former option – we should have fewer pointless syntax variations not more. |
I'd be happy to add a usual deprecation for this. |
We should probably revisit these later and make them consistent too. |
Hi,
This is the GMT package that works fine with 0.4 and used to work too with a some months old 0.5dev, but now it errors on loading with
The offending code is
Julia version (nightly)
Version 0.5.0-rc0+4 (2016-07-27 09:20 UTC)
Commit 347057b (1 day old master)
x86_64-w64-mingw32
The text was updated successfully, but these errors were encountered: