-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
GDScript: Add CONFUSABLE_CAPTURE_REASSIGNMENT
warning
#93691
GDScript: Add CONFUSABLE_CAPTURE_REASSIGNMENT
warning
#93691
Conversation
0feb552
to
7b0ff30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both the name and documentation description of this warning do not mean much to the user that is going to stumble upon this warning while writing a lambda function.
@Mickeon What exactly causes you concern? Is the problem in the wording or terminology? Can you suggest a better option? |
The warning's name sounds correct, but it's a bit hard to understand. "Confusable", but why? It's somewhat broad. An assignment can be "confusing" for a few other reasons too. I have no other better suggestions at the moment. I just know that because this is a very specific warning, it needs a very specific name (potentially just mentioning lambdas/callables directly?). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
I agree that it could use mentioning lambdas at least in the description, and maybe in the warning's name (but that will start being long).
People familiar with lambdas will understand what capture refers to, but people not familiar with lambdas will also be going through the list of warnings to see what's useful to them, so it would help to scope it better to the relevant concept.
You are right, I forgot to add this to the Project Settings description, although it is present in the warning message:
I thought about |
7b0ff30
to
68898db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Begrudgingly we cannot have warning names that span the width of your monitor.
Thanks! |
This is not a bug fix, but I think it would be nice to add the warning in 4.3, since this behavior is quite confusing while the change is simple and low risk.