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

Dmitri Blinov commented on JEXL-252:
------------------------------------

The {{object.`property`}} syntax alone, without interpolation, allow for more 
special characters to be used. To me the idea of a property name being a 
constant, seems not so important as the ability to use operators {{.}} and 
{{[]}} differently semantically. For example I want to reserve operator {{[]}} 
for accessing object by numbered indexes, like 1 or 1..3, lets call it array 
semantics, and reserve operator {{.}} for accessing object properties, lets 
call it property semantics. For a property semantics to have more flexibility 
it would be great to have ability to specify not only constants, but to use 
variables as well

> 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