On Sun, 2011-03-06 at 17:41 -0800, Jonathan M Davis wrote: [ . . . ] > If anything, I'd argue to simply remove .. from foreach and have iota be the > way > to do it. The only other inconsistency is with case statements, but making > them > have an open right end would likely be problematic (not to mention break tons > of > code), whereas an open right end is exactly what it should be in the general > case. I really don't see the problem other than the fact that using .. in > foreach is completely redundant at this point, since we have iota.
If .. is not going to mean a range of values everywhere then it should be allowed nowhere. This includes array slicing as well as foreach. Having a special case that leads people to try and use it as the general case is the worst of all worlds. Case labels will be the problem. range in Python is a range that is inclusive at the beginning and exclusive at the end, there are no special cases. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part