amelentev / java-oo

Java Operator Overloading
http://amelentev.github.io/java-oo/
268 stars 31 forks source link

Avoid instantiation with assignment operator #41

Open elect86 opened 8 years ago

elect86 commented 8 years ago

Hi,

Let me first say this is an awesome project!

Second, I'd like to know if it could be possible to change the assignment operator behaviour to avoid a new instantiation whenever the object already exists, for example:

Vec2 a = new Vec2() a = b + c * 2;

here the assignment operator may point a set method instead of valueOf