paulk-asert commented on pull request #1332:
URL: https://github.com/apache/groovy/pull/1332#issuecomment-669138850


   > > even returning a copy is a breaking change
   > 
   > That's my take. Since there is little chance of avoiding a breaking 
change, why not stick with returning immutables and let Vert.x adjust to making 
a copy to iterate over or performing changes after iteration is completed. I 
don't think the design was to return something for modification; that's 
exposing the implementation of `ModuleNode`. The emergent behavior that 
`getImports()` could be iterated over and `addImport(...)` could be called was 
not intended IMO.
   > 
   > Worst case, could 3.x get the change just for `getImports()` and master be 
left as is?
   
   @eric-milles As you will have seen, I reverted everything for now. It would 
be good to make these all consistent in Groovy 4 but we should provide a 
consistent approach across all AST nodes and a considered approach for mutating 
and have any breaking changes (if needed) documented in the release notes.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to