[Cython] Fused Types
Stefan Behnel
stefan_ml at behnel.de
Sun May 1 16:36:16 CEST 2011
Sturla Molden, 01.05.2011 15:29:
> Den 01.05.2011 02:24, skrev Greg Ewing:
>> Stefan Behnel wrote:
>>> Meaning, we'd find a new type during type analysis or inference, split
>>> off a new version of the function and then analyse it.
>>
>> I'm not sure that this degree of smartness would really
>> be a good idea. I'd worry that if I made a type error
>> somewhere, the compiler would go off and spend a few
>> hours generating umpteen zillion versions of the code
>> instead of stopping and telling me something was wrong.
>
> I think so too.
>
> Cython has a square-bracket syntax for C++ templates. Why not defer the
> whole problem to the C++ compiler? Just emit the proper C++.
Not everyone uses C++. And the C++ compiler cannot adapt the code to
specific Python object types.
Stefan
More information about the cython-devel
mailing list