polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niclas Hedhman (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (POLYGENE-36) Java 8 Predicates to be used for Constraints?
Date Sat, 25 Feb 2017 01:30:44 GMT

     [ https://issues.apache.org/jira/browse/POLYGENE-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Niclas Hedhman closed POLYGENE-36.
    Resolution: Won't Fix

After investigating the consequences of this, I am against this change.

Just because a more abstract abstraction can be used, doesn't mean that it should be used.
We prize explicit expressions over obscure generalities, and we should not start here.

> Java 8 Predicates to be used for Constraints?
> ---------------------------------------------
>                 Key: POLYGENE-36
>                 URL: https://issues.apache.org/jira/browse/POLYGENE-36
>             Project: Polygene
>          Issue Type: Improvement
>            Reporter: Niclas Hedhman
>            Assignee: Niclas Hedhman
>             Fix For: 3.0
> In Java 8, the Predicate class is suitable to be used for Constraints. And I think we
should leverage the versatility of this on Ver 3.0
> The difference is that the Predicate.test() method is lacking the Annotation argument,
which often used to pass arguments to the constraint. But we can equally easily inject the
annotation instead.
> I think that that org.qi4j.api.constraint.Constraint class has no purpose, other than
for compatibility reason, but I might be wrong.

This message was sent by Atlassian JIRA

View raw message