Lisandro Dalcin wrote: > On Thu, Jun 11, 2009 at 2:06 PM, Stefan Behnel<stefan...@behnel.de> wrote: >> When I see a C array, I think of a memory block with a sequence of >> identically typed items. I also think of a Python tuple because that >> behaves very similar. I totally do not think of a math vector, because that >> is a very (very!) special use case. > > Well, for me it is not a matter about how do think of view an array, > but what do you want to do with an array. Could you tell me (apart > from char/wchar_t because of byte/unicode strings) how many times in > your life as a programmer did you need to concatenate an array of let > say integers or double precision floats ? That (I mean, concatenation) > is for me a very (very!) special use case for arrays...
Have you never concatenated tuples? I consider this the usual chicken and egg problem. If the functionality was available, people would use it. Currently, I avoid C arrays in Cython wherever I can, simply because it's really hard to deal with them (manual memory management, resizing, ...). If Cython grew native array and vector types, I bet people would just jump on them. I'd even vote for allowing resizing of Cython's array type (or a subtype), maybe through a resize() method that would call realloc() internally. That would remove the need to keep C types in Python lists (or to do manual memory management to achieve the same). Stefan _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev