-
Notifications
You must be signed in to change notification settings - Fork 33
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
Lint goto? #33
Comments
I'm fine with taking it out, as it looks like I don't feel as strongly about this as you do. |
I think that warning about goto is strange – it's not like you can easily use it by accident or anything. If you use it, you meant to and presumably know what you're doing. |
Thank you for your feedback. The code and tests have been removed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a continuation of the lint
@goto
discussion in JuliaLang/julia#1289 (comment)I would say the question to ask to find the is, "Is it common for the writer/reader of this code to think it does something different?".
goto
will often obfuscate and make the logic flow of your program hard to follow, but no one will be surprised about how it works. Lots of users gets surprised when[1:0]
results inInt[]
not[1, 0]
, and the only reason it doesn't is that we want type stability and a super efficientUnitRange
type with a hardcoded (inlined) step of1
.I assumed you had lintpragma for all lint messages, so that doesn't really change anything for me, but I'm not the one to dictate the scope of lint.jl.
@goto
is probably rarely the right answer to the question, so a lintpragma might just be another reason to really rethink your code structure.The text was updated successfully, but these errors were encountered: