[
https://issues.apache.org/jira/browse/GROOVY-11294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814328#comment-17814328
]
ASF GitHub Bot commented on GROOVY-11294:
-----------------------------------------
paulk-asert commented on PR #2044:
URL: https://github.com/apache/groovy/pull/2044#issuecomment-1926785163
As per comment in the issue, I'll close this PR. There is plenty of scope
for further improvements - as noted, even with POJO, records still make calls
into runtime. This is why @POJO is marked @Incubating and one of the things we
still plan to improve. But it is the kind of thing we'd like to improve for
more than just records if we can, so we'd target a broader change if we can
make such a change.
> Make generated toList() and toMap() methods on records return immutable
> collections
> -----------------------------------------------------------------------------------
>
> Key: GROOVY-11294
> URL: https://issues.apache.org/jira/browse/GROOVY-11294
> Project: Groovy
> Issue Type: Improvement
> Components: record
> Affects Versions: 5.x
> Reporter: Oscar N
> Priority: Minor
>
> With records having strong immutability guarantees, I believe it would make
> sense to also have the collections returned by `toList()` and `toMap()` be
> immutable as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)