[ https://issues.apache.org/jira/browse/JEXL-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17531394#comment-17531394 ]
Dmitri Blinov commented on JEXL-367: ------------------------------------ [~hussachai] thanks for the thorough observation, but my question was rather about why trying to make JEXL yet another JS, groovy or you name it. One probably won’t get close to the original, and what is the point of being half alike? There are open projects like aforementioned rhino, that one can freely use now-days and enjoy bells and whistles. But IMO, in JEXL world you will hardly make variables work like JS ones, regarding redefinition, hoisting and capturing behavior, without overcomplicating the long existing concept of context and local variables with toggles and features. [~henrib] I think JS have coined some cool features, that JEXL can surely benefit from, but IMO its variable model is not one of them, are you sure you want let it ‘let’ ?:) > Deprecate -> and support => > --------------------------- > > Key: JEXL-367 > URL: https://issues.apache.org/jira/browse/JEXL-367 > Project: Commons JEXL > Issue Type: Wish > Affects Versions: 3.2.1 > Reporter: Hussachai Puripunpinyo > Assignee: Henri Biestro > Priority: Major > > The JEXL code surprisingly looks a lot like Javascript. I think this change > is a good transition for folks to update the code, and it's pretty fine if > they can tolerate using the deprecate syntax and don't mind seeing a warning > log pop up every time. > I'd like to propose supporting => and deprecate ->. > The reasons are > - JavaScript becomes very popular and many people are familiar with it. > - JEXL is more like for a quick short script. In many scenarios, the target > audiences are not a programer. They often mistake a language as a JavaScript > (from my experience). > - JEXL syntax already looks a lot like JavaScript > -- var for variable declaration (Java added in Java 10, but JavaScript > supports this from the beginning) > -- The function keyword > -- Implicit type coercion > -- Ternary operator > The proposed change. > * Support => in addition to -> > * Deprecate -> and show a warning log when it's used. -- This message was sent by Atlassian Jira (v8.20.7#820007)