Original Post
I''ve decided to write my own script-language. I''m still working in the design process and it will look much like Java. However I want my language to support operator overloading. And therefor needs some idea''s how this could look like.
C++ handles it this way:
SomeClass operator = (SomeClass);
And the ideas I have looks like this:
SomeClass assign(SomeClass);
SomeClass add(SomeClass);
SomeClass sub(SomeClass);
SomeClass mul(SomeClass);
SomeClass div(SomeClass);
ie. registered method names, that will also work as operators, ie:
SomeClass.assign(someOtherClass); <==> SomeClass = (someOtherClass);
I hope you understand what I mean. However I would like to recieve some other ideas and some feedback on my idea.
Thanks.