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

Dmitri Blinov edited comment on JEXL-373 at 6/12/22 4:53 PM:
-------------------------------------------------------------

There is also an open question whether default increment/decrement operator 
arithmetic should trigger overloaded {{+=}} / {{-=}} operators, in case those 
are defined for the incremented/decremented target object. One might expect 
that ++x should be equal to x += 1 rather than x = x + 1 like in current 
implementation. I think this can be a better choice in case of complex 
structeres (like collections or atomics) too, because casual + operator in that 
case may mean creation of a *new* object adjusted with one element, whereas 
self-add += operator may mean modification of the *existing* left-side object.


was (Author: dmitri_blinov):
There is also an open question whether default increment/decrement operator 
arithmetic should trigger overloaded {{+=}} / {{-=}} operators, in case those 
are defined for the incremented/decremented target object. One might expect 
that ++x should be equal to x += 1

> Add support for prefix/postfix increment/decrement operators
> ------------------------------------------------------------
>
>                 Key: JEXL-373
>                 URL: https://issues.apache.org/jira/browse/JEXL-373
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.2.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.3
>
>
> The prefix/postfix increment/decrement operators as in:
>  {code}lhs++; ++lhs; lhs--; --lhs;{code} 
> lhs being a left-hand-side value, a value that can be assigned.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to