You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Bruno P. Kinoshita" <br...@yahoo.com.br> on 2015/04/11 12:21:09 UTC

[functor] [PATCH] Add predicates

Hi all, 

FUNCTOR-30 [1] contains a patch for [functor] that I'd like to merge. I will spend one or two other days reviewing the code style & tests, and will wait till the middle of the week before merging, so that others can take some time to review too.
The patch provides several predicates to use with Strings, such as IsNull, IsAlpha, IsAlphanumeric, etc. Most of them calling existing methods in [lang]'s StringUtils.

All the best,Bruno
[1] https://issues.apache.org/jira/browse/FUNCTOR-30
 

Re: [functor] [PATCH] Add predicates

Posted by "Bruno P. Kinoshita" <br...@yahoo.com.br>.
Hi Benedikt,
> Nice to see same action in the functor component again. Does functor have a dependency on lang? Usually we try not to have dependencies between components...
Indeed!

Yes it does. It was used mainly for validating method parameters, using ValidationUtils if I recall correctly. However, during build [lang] API is shaded.

> Further more I don't really see the use case for this addtion. Releasing functor for Java 7 doesn't make much sense to me. Functor and Java 8 lambdas are a perfect match. But if we target Java 8, one could simply write
Excellent feedback Benedikt! I'm not up to date to Java 8 - still working in a bunch of projects with Java6 and 7. I'll take a further look at the existing predicates in Java 8 to investigate whether it makes sense to include all the predicates in the patch or not.

Thanks a lot!Bruno

 
      From: Benedikt Ritter <be...@gmail.com>
 To: Commons Developers List <de...@commons.apache.org> 
 Sent: Sunday, April 12, 2015 10:48 PM
 Subject: Re: [functor] [PATCH] Add predicates
   
Hi Bruno,

Send from my mobile device

> Am 11.04.2015 um 12:21 schrieb Bruno P. Kinoshita <br...@yahoo.com.br>:
> 
> Hi all, 
> 
> FUNCTOR-30 [1] contains a patch for [functor] that I'd like to merge. I will spend one or two other days reviewing the code style & tests, and will wait till the middle of the week before merging, so that others can take some time to review too.
> The patch provides several predicates to use with Strings, such as IsNull, IsAlpha, IsAlphanumeric, etc. Most of them calling existing methods in [lang]'s StringUtils.
> 

Nice to see same action in the functor component again. Does functor have a dependency on lang? Usually we try not to have dependencies between components...

Further more I don't really see the use case for this addtion. Releasing functor for Java 7 doesn't make much sense to me. Functor and Java 8 lambdas are a perfect match. But if we target Java 8, one could simply write:

StringUtils::isEmpty

No need to define a separate predicate implementation...

br,
Benedikt



> All the best,Bruno
> [1] https://issues.apache.org/jira/browse/FUNCTOR-30
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


   

Re: [functor] [PATCH] Add predicates

Posted by Benedikt Ritter <be...@gmail.com>.
Hi Bruno,

Send from my mobile device

> Am 11.04.2015 um 12:21 schrieb Bruno P. Kinoshita <br...@yahoo.com.br>:
> 
> Hi all, 
> 
> FUNCTOR-30 [1] contains a patch for [functor] that I'd like to merge. I will spend one or two other days reviewing the code style & tests, and will wait till the middle of the week before merging, so that others can take some time to review too.
> The patch provides several predicates to use with Strings, such as IsNull, IsAlpha, IsAlphanumeric, etc. Most of them calling existing methods in [lang]'s StringUtils.
> 

Nice to see same action in the functor component again. Does functor have a dependency on lang? Usually we try not to have dependencies between components...

Further more I don't really see the use case for this addtion. Releasing functor for Java 7 doesn't make much sense to me. Functor and Java 8 lambdas are a perfect match. But if we target Java 8, one could simply write:

StringUtils::isEmpty

No need to define a separate predicate implementation...

br,
Benedikt

> All the best,Bruno
> [1] https://issues.apache.org/jira/browse/FUNCTOR-30
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org