On 05/02/2011 03:00 PM, Sturla Molden wrote:
Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn:

I.e., your question is very vague.

Ok, what I wanted to ask was "why have one syntax for interfacing C++
templates and another for generics?" It seems like syntax bloat to me.

But we do that. The CEP specifies that if you have

def f(floating x): return x**2

then "f[double]" will refer to the specialization where floating==double, and calling f[double](3.4f) will make the float be upcast to a double.

There's no [] within the function definition, but there's no "prior art" for how that would look within Cython.

Dag Sverre
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to