You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Xu Pengcheng (Jira)" <ji...@apache.org> on 2023/07/08 03:40:00 UTC

[jira] [Comment Edited] (JEXL-399) Needs support more javascript syntax

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

Xu Pengcheng edited comment on JEXL-399 at 7/8/23 3:39 AM:
-----------------------------------------------------------

Thanks for your explanation.


was (Author: JIRAUSER294041):
Thanks for your explaination.

> Needs support more javascript syntax
> ------------------------------------
>
>                 Key: JEXL-399
>                 URL: https://issues.apache.org/jira/browse/JEXL-399
>             Project: Commons JEXL
>          Issue Type: New Feature
>            Reporter: Xu Pengcheng
>            Priority: Major
>
> Hi, I am trying ask chatgpt to generate code for some cases, JEXL, as a lightweight, secure, easy to communicate with host solution, I think is the best option for java world as a bridge between chatgpt and app.
> Unfortunately, chatgpt seems is not familiar with Jexl syntax, so I tried to ask chatgpt to write as javascript, I had implements most of the javascript build-in objects (like Array, Object, Math, console, etc) for JEXL, 95% cases generated by chatgpt can run successfully.
> However, some syntax error will cause the 5% failure, for example:
>  # a === b
>  # a !== b
>  # a = b ** 2
>  # const \{a, b} = x;
>  # a = \{x: 1, y: 2,}
>  # func = () => (\{"a":1, "b": 2})
>  # for (let k in map)
>  # for (let value of map)
> These syntax looks very reasonable, It will be great to support these javascript syntax to let both chatgpt and developer easy to use.
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)