[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Numeric for loops...
- From: Duncan Cross <duncan.cross@...>
- Date: Sat, 29 May 2010 12:43:06 +0100
On Sat, May 29, 2010 at 8:27 AM, Jonathan Castello <twisolar@gmail.com> wrote:
> I think it's slightly lamentable that "for i=1, 10, 100" is almost
> identical to "for i in 1, 10, 100", but that's just me.
You mean, just syntactically, you dislike that they are so similar? Or
you think that they are actually semantically similar?
for i =
1 is *not* a function. 10 is not an invariant
I disagree, I do not think they are almost identical at all. 1
>
>> We might as well argue to have only one sort of loop (no while, no repeat --
>> express them all with iterators, and to hell with readability), or to get
>> rid of the '-' and '/' operators in favour of recondite stuff like:
>>
>> difference = amountdue + math.negative(amountpaid)
>>
>> and:
>>
>> threequarters = 3 * math.reciprocal(4)
>>
>
> I dearly miss +=, -=. *=, and /=.
>
> ~Jonathan
>