commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Blinov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JEXL-268) Jexl lambdas as parameters to new Java8 methods
Date Mon, 03 Sep 2018 08:29:00 GMT

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

Dmitri Blinov commented on JEXL-268:
------------------------------------

About next major release, are you interested in starting a development branch for something
newer that Java6? Java8 is four years old now. We could have some experimental language stuff
to go there without disrupting the current branch, which could be eventually released as 3.2
for those who need backward compatibility

> Jexl lambdas as parameters to new Java8 methods
> -----------------------------------------------
>
>                 Key: JEXL-268
>                 URL: https://issues.apache.org/jira/browse/JEXL-268
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Priority: Minor
>
> Java8 introduced functional interfaces, among them {{Function}} and {{BiFunction}} interfaces
which are used as parameters to method calls, for example, {{Map.computeIfAbsent()}} or {{Map.computeIfPresent()}}.
In Jexl we have lambdas which in theory are good candidates to construct a {{Function}} for
lambda with one parameter, and a {{BiFunction}} for lambda with two parameters.
> The problem is Jexl can not currently support Java8 features and all instances of lambda
are of single {{internal.Closure}} class, which should not try to implement both interfaces
at once. One of the solutions, IMO, is to have a feature to overload lamda creations to construct
custom lambda classes without shaking Jexl code tree.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message