[Cython] array assignment
Robert Bradshaw
robertwb at math.washington.edu
Sat Oct 11 16:17:35 CEST 2008
On Oct 11, 2008, at 7:17 AM, Dag Sverre Seljebotn wrote:
> Dag Sverre Seljebotn wrote:
>> Dag Sverre Seljebotn wrote:
>>
>>> What do I propose instead?
>>> a) That the reference-counted heap-allocated array stuff in the
>>> wiki
>>> is implemented first (with a list constructor). So the thing gets
>>> the
>>> semantics of a reference counted array, constructed again each
>>> time it
>>> is assigned (very similar to a Python list).
>>>
>>> b) That simple cases (where the pointer is never reassigned or
>>> copied,
>>> only written/read to/from by indexing) are then optimized to use
>>> stack
>>> allocation instead.
>>>
>>
>> First and foremost the point now is to .
>
> Sorry! I meant: The point now was to argue for postponing the decision
> for later and disable it in the upcoming release.
>
> I'd settle for disabling any "literal assignment" to the pointer
> outside
> of the declaration though, then I'd be back to "not worrying". (One
> could also disable it only inside loops, but that is too ugly and
> inconsistent.)
I'm OK with only allowing it outside of declarations (and even
better, only to an array type), but don't know if I'll have time to
do that anytime soon.
- Robert
More information about the Cython-dev
mailing list