Wednesday, July 1, 2009

Some questions about syntax

We are deciding what syntax to use on operators overloading and constructor.
We have C++ and Python syntax, and we have big differences between them.
A thread was created on cython-dev list for voting and commenting the choose of the syntax.
On C++ syntax, the constructor is a method with no return type (it's not void!) and the operators are methods with the keyword "operator" followed by the operator to overload (e. g. "bool operator==(int value);").
On Python, we have the special method __init__ for constructor and other special methods for the operators (__add__, __str__, etc.)

For more information, take a look at the wiki of the project:
http://wiki.cython.org/gsoc09/daniloaf/progress

No comments:

Post a Comment