commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Blinov (JIRA)" <>
Subject [jira] [Created] (JEXL-200) Support for dynamic scripting in jexl scripts
Date Fri, 17 Jun 2016 12:02:05 GMT
Dmitri Blinov created JEXL-200:

             Summary: Support for dynamic scripting in jexl scripts
                 Key: JEXL-200
             Project: Commons JEXL
          Issue Type: New Feature
    Affects Versions: 3.0
            Reporter: Dmitri Blinov
            Priority: Minor

Allow for dynamically defined functions inside a script where the definition of the function
comes from a string expression, for example:

def x(y) = "return y+2";

the defined function should be accessable after its definition is successfully parsed as ordinary
function, and can be evaluated in the current context.

if (x(40) eq 42) {...

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

View raw message