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

Henri Biestro commented on JEXL-252:
------------------------------------

The idea behind {code:java}x.'y z'{code} syntax is to allow using constant 
property names that contain spaces/special characters. The constant part is 
important here; we have a syntax when a property is dynamic, the 
{code:java}x.[y]{code} notation.
The different access operators overloads allow managing the difference between 
{code:java}map.length{code} and {code:java}map['length']{code}.
What you propose is currently solved using {code:java}x.[`y`]{code}.

> Allow for interpolated strings to be used in property access operators
> ----------------------------------------------------------------------
>
>                 Key: JEXL-252
>                 URL: https://issues.apache.org/jira/browse/JEXL-252
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Priority: Minor
>
> Now we have a possibility to access an object property by specifying either 
> {code}object.property{code} or {code}object."property"{code} expression, but 
> not {code}object.`property`{code} expression. Since interpolated strings can 
> be used anywhere in scripts as ordinal strings, it would be logical to allow 
> them to be used in property access operators too. It would allow to have the 
> property name not necessarily to be a constant, but to be evaluated without 
> using the array access operator, since property access operator and array 
> access operator could be implemented (overloaded) differently for the object.



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

Reply via email to