groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Ledbrook (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7432) Enhance CharSequence with appropriate Iterable extension methods
Date Tue, 09 Jun 2015 16:01:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579140#comment-14579140
] 

Peter Ledbrook commented on GROOVY-7432:
----------------------------------------

These are just a few notes I want to add to the pull request to bring reviewers' attention
to anything I'm uncertain about.

* Will the return type signature on {{groupBy()}} work in a type-checked environment?
* {{containsAll()}} accepts a {{CharSequence[]}}, which means that objects of type {{String[]}}
need to be converted, otherwise you get a {{MethodMissingException}}. Does that seem reasonable?
* Should return types, particularly in generics, use {{String}} instead of {{CharSequence}}
since strings are invariably returned from those methods?

> Enhance CharSequence with appropriate Iterable extension methods
> ----------------------------------------------------------------
>
>                 Key: GROOVY-7432
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7432
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-jdk
>            Reporter: Peter Ledbrook
>            Assignee: Guillaume Laforge
>
> Groovy enables developers to treat {{CharSequence}}s as if they were true sequences.
For example, you can use a for loop and the array index operator. 
> Some extension methods are missing though. One I was hoping to find was the {{count(Closure)}}
method. I think it makes sense to incorporate any {{Iterable}} extension methods into {{CharSequence}}
as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message