I = I + 1

is TRUE

If you are comfortable with that - you are not the only who thinks so. There is nothing wrong. It can be true. 

But the world of programmers, who believe in that and use it, always face, what is called, DESTRUCTIVE ASSIGNMENT. It means, destruction of value by assignment.

It means a lot. First, easy to use. One variable can be used as many time, as you need, no need to declare extra variables.

Assigned many times to different values - use 'I' to count indexes, apples, oranges, cockroaches.

And as result - this will lead you to bugs. Sooner or later.

Did you have an error - array index out of boundaries? Did you think why?

I was on the same boat many years ago until met Prolog and logical programming. It is different word. I do not have a goal to convert you to new religion. But once you visited this page - one more page to read will not take much of your time, so, please read my I = I + 1 story.....


Copyright 2002 (c) EDMGROUP (Australia) Pty Ltd