Re: [Cython] Language stability

"Stefan Behnel" <[email protected]> Tue, 13 May 2008 14:15:00 +0200 (CEST)
Newsgroups gmane.comp.python.cython.devel,gmane.comp.python.pyrex
Message-ID <25237.194.114.62.67.1210680900.squirrel@groupware.dvs.informatik.tu-darmstadt.de>
Hi Greg,

Greg Ewing wrote:
>> where the (IMHO much more obvious) cdef +
>> range() syntax is optimised
>
> Even in the presence of this optimisation, I don't consider
> that the integer for-loop syntax is entirely redundant.

Not redundant, no. But less calling for improvement.


> The 'for i from...' version was a compromise

I understand that. Still, having two spellings for "for ... in ...", one
for Python, one for C, looks better than a completely different syntax
that just starts with "for". So I vote for

    for x in iterable:

and

    for x in 1 < x <= 5:

instead of the new

    for 1 < x <= 5:

purely for readability (and obviously keeping the old "from" spelling for
compatibility).

Stefan