[ https://issues.apache.org/jira/browse/GROOVY-11692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956740#comment-17956740 ]
ASF GitHub Bot commented on GROOVY-11692: ----------------------------------------- paulk-asert commented on PR #2247: URL: https://github.com/apache/groovy/pull/2247#issuecomment-2953207162 > I agree with Christopher Smith from the mailing list that the semantic of count is different from size. https://lists.apache.org/thread/8yknyvcxbksoojh6rz5shwv6jdjy1dnx For those folks who are expecting every aggregate to have a `size()` method, do you have an alternative implementation for `size()` in mind that would better match their expectation? Or are you indicating that we'd better explain the unusual behavior (like we do for `Iterator#size`)? Folks who want to make the different semantics clearer would be free to use `count()` and wouldn't have to use `size()`. > Add a Stream#size extension method that is an alias for Stream#count > -------------------------------------------------------------------- > > Key: GROOVY-11692 > URL: https://issues.apache.org/jira/browse/GROOVY-11692 > Project: Groovy > Issue Type: Improvement > Reporter: Paul King > Assignee: Paul King > Priority: Major > > Most of our size() methods return int but I was planning to return long here > to match Stream#count(). -- This message was sent by Atlassian Jira (v8.20.10#820010)