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 2018/09/03 08:59:00 UTC

[jira] [Commented] (JEXL-264) Allow space, quote & double-quote in identifiers

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

Dmitri Blinov commented on JEXL-264:
------------------------------------

As of identifiers starting with numbers, or may be minuses or what not, I think it's good not to have escape characters to be used anywhere in the language except in string constants, as IMO the script readabilty may suffer from this. As of unicode characters in general, these can be used without escaping, but there are really some strange ones, like arrows or boxes, that, again IMO, should be banned from being used as a variable names. So if this can be tackled somehow, I can sumbit a request. But as the root problem really relates to accessing context variables, not the ones declared inside the script, I thought that introducing {{this}} keyword for this purpose would make sence.

> Allow space, quote & double-quote in identifiers
> ------------------------------------------------
>
>                 Key: JEXL-264
>                 URL: https://issues.apache.org/jira/browse/JEXL-264
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.2
>
>
> Since a Jexl context may be backed by a map that is not under Jexl's control, it may happen that keys in such a map contains spaces (quotes, backquotes).
> Scripting these top-level variables is then not very easy; adding an escaping mechanism in the syntax for top-level identifiers is provably convenient in this case.
> For example:In a script, {code}My\ Variable = 3{code} sets the top level variable keyed with the string "My Variable" with the value 3.



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