Stefan Behnel wrote:
> I wouldn't care so much about that for now. Whatever declaration we
> choose, it's easily added when the feature itself is there, and I think
> parametrised types are such an advanced feature that users can well wait
> for it to become available in pure Python mode.
> 
> The priorities should be to make the feature simple and well readable in
> Cython code, and then 'somehow' available in Python code.

I disagree with this principle. (I guess it might be a matter of taste 
in the end, so I'll just state my opinion and try not to drag this on 
for too long.)

In perhaps about a year, with Python 3 argument decorators (def foo(x: 
int) -> float) and a bit of type inference, "pure Python mode" could 
actually become as convenient as Cython syntax and the preferred syntax 
we'd teach new users in my opinion.

And anyway, I'm in favor of avoiding to have to invent two kinds of 
syntax for new features. Especially when the benefits are so small! (One 
uses a template a lot more than writing them.)

It's just a mess to have to tell users "this one is the Cython syntax 
but you can also use this one for Python compatability" etc.; that 
problem is there to stay but I don't see the sense of keeping adding to it.

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

Reply via email to