Skip to content

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.

Sidebar

Clone this wiki locally