> No.  Clarifying my above idea -- to the programmer, a cdef int would
> be a c int, a cdef float would be a c float, a py_int would be a
> python int, and a py_float would be a python float.

Yes, that is nice.

And now the semantics should be different, depending on the type.

A numerical litteral could default to the Python type, unless a cast i made.


> To step back -- if the only way to drop into fast compiled code is to
> learn c semantics, it will cause problems for people who just want to
> cythonize their python code.  If you use python semantics, it will
> cause problems for people who are c programmers using cython to write
> mixed python-c code.  So doing this seems to give everyone something
> they like.

Exactly. That is what I have been trying to communicate.

Keep C and Python types apart. Don't ad Python semantics to a subset of
the C types. Add a completely new set of types that directly corresponds
to the Python equivalent.


Sturla MOlden



_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to