You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/08/13 11:23:04 UTC
[GitHub] [groovy] paulk-asert edited a comment on pull request #1608: GROOVY-10195: Groovy should have a @Final AST transform
paulk-asert edited a comment on pull request #1608:
URL: https://github.com/apache/groovy/pull/1608#issuecomment-898378130
> I find it confusing to try and sort out the purpose of `final` vs `@Final` vs `@AutoFinal`. Is the concept of "no extend" or "no override" what is represented here?
You can think of `@Final` is just an alias for `final` but one that you would almost never use directly (since you can just use `final` after all). However, in meta-annotation scenarios, it can be useful to be able to "mix in" that functionality.
`@AutoFinal` is about adding final to the parameters of (typically) a method or constructor. We also support closure params when such a closure is assigned to a field (where we have a node to add the annotation to).
I updated the documentation, let me know if you think it is clearer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org