-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement operators for objects #64
Comments
Proposed syntax for operator overloading:
Where:
Example:
Notes:
|
Hint: why not also try to assess the properties of the new definitions? We could issue warnings if the user tries to define partial order operators to something different than partial order relationships or define equivalence operators to something different than equivalence relationships. We should also disallow the overloading of the following operators: Overloading
Overloading
|
The default behavior should be to apply the same operator to each member, but it needs to be defined in detail for binary operators that receive two objects (they may have different fields) and for native objects (they may be cyclic).
Operator overloading should be allowed due to important use cases (e.g. it is good to define partial order and equivalence relationships on elements of arrays, so that those relationships need not be specified to array methods such as
contains
,sort
,unique
,union
, etc.The text was updated successfully, but these errors were encountered: