Search code examples
xtend

Assignment Operator (=) overloading in xtend


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)?


Solution

  • 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.