You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dmitri Blinov (JIRA)" <ji...@apache.org> on 2016/06/23 12:54:16 UTC

[jira] [Resolved] (JEXL-200) Support for dynamic scripting in jexl scripts

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

Dmitri Blinov resolved JEXL-200.
--------------------------------
    Resolution: Resolved

Now I don't see any reason for this issue to be implemented. Thanks for your clarifications.

> Support for dynamic scripting in jexl scripts
> ---------------------------------------------
>
>                 Key: JEXL-200
>                 URL: https://issues.apache.org/jira/browse/JEXL-200
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.0
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Minor
>
> Allow for dynamically defined functions inside a script where the definition of the function comes from a string expression, for example:
> {code}
> var x = function(y) => "return y+2";
> {code}
> the defined function should be accessible after its definition is successfully parsed as ordinary function, and can be evaluated in the current context.
> {code}
> if (x(40) eq 42) {...
> {code}
> I think the idea of dynamic script evaluation is not unusual, and though to some extent can be implemented via side-added functions like *eval(expr)* a dedicated syntax for this will benefit from the simplicity of ordinal functions and the ability to control mapping of the arguments between a caller and the defined function.



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