[Pyrex] ANN: Pyrex 0.9.7

Brian Blais bblais at bryant.edu
Sat May 10 13:16:26 CEST 2008


On May 9, 2008, at May 9:7:57 AM, Greg Ewing wrote:

>
> * I have streamlined the integer for-loop syntax. Instead
>    of the loop variable redundantly appearing in two places,
>    it's now just
>
>      for x < i < y:
>        ...
>
>

Not that my opinion matters a whole lot, but I prefer the redundant  
syntax.  This new syntax solves a problem, and introduces a problem  
which (in my opinion) is worse.  In python, I am used to syntax:

for var in stuff:

where my eye finds "var" and then "stuff", so I first find out the  
relevant variable, and then the values it will take.

in old pyrex syntax,

for var in begin<= var < end:

my eye finds "var" and then "begin" and "end", so I first find out  
the relevant variable, and then the values it will take.

In the new syntax,

for begin <= var < end:

my eye finds some values of var, then the relevant variable, then the  
end.  It changes the logic of the for-loop organization in my head,  
and as I read.  It makes it less like Python, and thus more jarring  
to go between the two.

Personally, I never minded the redundancy (how much extra typing is  
it really?)

I find breaking readability, and a parallel with existing python  
syntax to be far far worse.  I hope you keep the two syntaxes, and  
see what the response is when developers actually use it for a  
while.  My gut feeling is that the new syntax will not be favored,  
but I could very well be wrong.


		Just my 2c


				thanks,


					Brian Blais


-- 
Brian Blais
bblais at bryant.edu
http://web.bryant.edu/~bblais



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20080510/1c331c88/attachment.html 


More information about the Pyrex mailing list