Dag Sverre Seljebotn wrote:
> Thanks to chats with Kurt and Robert, I think I've managed to present my 
> thoughts from a different and more constructive angle.
> 
> http://wiki.cython.org/enhancements/array
> 
> There's some time constraints in the picture for various reasons (e.g. 
> Fortran GSoC development direction) so it would be great if this could 
> be resolved one way or the other before too long.

I'm mostly happy with the proposal. IMHO, this would also fit many use
cases of ticket 153

http://trac.cython.org/cython_trac/ticket/153

- I wonder why the "custom reference counting" is necessary, though. I
assume that the main advantage of doing it in Cython instead of CPython is
that we could allow memory allocation and ref-counting in nogil blocks, but
that would require us to add some other kind of synchronisation for arrays
that pass function barriers. I don't think that's worth it.

I doubt that many people would be surprised by getting a real Python object
when they use this feature, so why not just implement Cython arrays as
PyVarObjects?

- Another point is the "inout" modifier in the one example. Would that only
apply to C++ or would the semantics be the same in C? And: is it a general
modifier that would also apply to scalar variables (and how), or only to
arrays? What about pointers?

If it only applies to arrays, maybe putting it inside the array declaration
(e.g. as a kw arg) makes more sense?

- Should this
"""
Arithmetic (a + b turned into a loop on the arrays a and b)
"""

read

"""
Arithmetic (a + b returns a concatenated copy of a and b)
"""
?

Stefan
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to