-
Notifications
You must be signed in to change notification settings - Fork 50
Operator Overloading
brett hartshorn edited this page Feb 24, 2015
·
2 revisions
Operator overloading is supported with Rusthon's C++ backend. https://github.com/rusthon/Rusthon/blob/master/examples/operator_overloading.md
Overloading requires the pointer to the object is dereferenced, when overloading []
using __getitem__
the pointer is always dereferenced for you. For other types of operators you need to manually deference using a[...]
.
TODO:
- setitem
- typer to check all variable types, and automatically dereference when needed.