1

I'm considering the use of xtend for a project that would benefit from its operator overloading, as that would greatly enhance readability of the code.

However what I didn't seem to come accross is assignment operator overloading. Did I miss it or doesn't it exist?

I'm not an expert but wouldn't that be technically just as feasible as the solution used for other operators like + that is mapped to e1.operator_plus(e2)?

Is assignment overloading something that is foreseen (when?) or is there a good reason not to support it (even in the future)?

geert3
  • 7,086
  • 1
  • 33
  • 49

1 Answers1

1

No, it's not possible to overload the plain assignment operator =. It may be considered in the future, but would require architectural and semantical refinements.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23
  • Thanks for your answer. So I should read that "Not possible" as "Not implemented but technically not impossible", correct? Is that something that is planned? Can we vote for features somewhere? ;-) – geert3 Jun 11 '15 at 19:47
  • Feel free to create a ticket and describe a convincing use case. From the top of my head it's hard to tell if technically possible or not, but concrete scenarios help to evaluate possible solutions. – Sebastian Zarnekow Jun 12 '15 at 07:37