[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: [zzdev] To loop or not to loop?

On  9 Aug, Benjamin Fallenstein wrote:
> Tuukka Hastrup wrote:
> Huh? No, it wouldn't be clearer to have a "loop" command. It's much,
> much clearer just to have the thing loop. It's one of the places where
> having loops is wonderful thing.

Not necessarily: if it's a command, you say you're going to loop. If
it's just one more connection, you can miss the point. Hmm, in Basic
you say FOR X=...NEXT X, in C you don't need to. Advanced. But then
again, in C you have the block structure and indents to help you - and
we all know you'll have to watch for blocks longer than you can see at
once on the screen. (Some people put these /* End of X loop */ comments
there just because of this).

I still don't simply swallow this. Sure this *if* something is the
right use of loops: to descibe a loop in the structure.

> Generally, I think we can say: The entities "wanting" loops those which
> STEP through something -- like a scripting engine stepping through a
> list of commands, or a view stepping through possible dimensions. If we
> want that these steppers go through a list infinitely, or as long as
> they don't find something that makes them do something else, we make the
> list loop; if we don't want them to, we don't make it loop.

This is true. I just wonder if these special cases would be better
handled by explicit jump-to-beginning cells.
> That's a very clean way of doing this, as it comes directly from the ZZ
> structure and no new constructs need to be defined for it.
> And then we have the entities which don't want loops, and just ignore
> them. To them, it doesn't make a difference if something loops or not --
> to the steppers, it does.

After this, then, I just need to know how to arrange the dimension
lists. It's clear we'll want the DimList cells be clones of the "real"
system list cells, right? And it would seem rational to connect the
system list directly to the DimLists structure (to avoid hanling exact
copy), or? And the system dimension list should be converted to a loop
although there's no real loop - just to support the dimension cycling

Another thing: how am I supposed to choose which DimList I'm using in


E-Mail: Tuukka.Hastrup@xxxxxx
WWW:    http://www.iki.fi/Tuukka.Hastrup
ICQ:	#11321669