[ https://issues.apache.org/jira/browse/GROOVY-10921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17710136#comment-17710136 ]
Eric Milles commented on GROOVY-10921: -------------------------------------- Thanks. I agree, if we were to start from scratch today, we would probably be using functional interface parameters for all these extensions. And we'd probably be using names that jive with the Java streams offerings. I would like to see a table that shows the Groovy and Java (streams) offerings side-by-side that highlights the gaps that we seek to close. Creating a third option somewhere between legacy Groovy extensions and Java streams just seems like overload, unless the benefit is compelling. Specific to {{each}} and {{forEach}}, I like to use {{each}} with a closure and I supply a lambda for {{forEach}}. Since Java does not offer "forEachWithIndex" I still think we offer value in the Closure-based extensions. I understand the recent effort to close the gaps for primitive arrays. For anything else, it would be helpful for me at least to see what is proposed before it comes through as a PR. > Optimised variants for AGM#each > ------------------------------- > > Key: GROOVY-10921 > URL: https://issues.apache.org/jira/browse/GROOVY-10921 > Project: Groovy > Issue Type: Improvement > Reporter: Paul King > Assignee: Paul King > Priority: Major > Fix For: 5.0.0-alpha-1 > > > Similarly as for min/max, we can have variants for each which use IntConsumer > and save boxing/unboxing overheads. -- This message was sent by Atlassian Jira (v8.20.10#820010)