COTTRELL, JAMES cottrell at nbs-vms.ARPA
Wed Oct 2 04:47:51 AEST 1985

/* Old business department. Doug Gwyn sez:
> I think this illustrates one of the potential problems with
> hiding the actual language underneath definitions.  If the
> loop REALLY continues "for ever", then it is probably not a
> good algorithm.

There are *lots* of `forever' type loops. How about process
control applications, or communication boxes? These processes
*never* exit (they are forcibly shutdown by pulling the plug,
rebooting, or `exit' somewhere in a called funxion).

> Possibly
 	#define	repeatedly	for ( ; ; )
> would be a better fit to English.

`Repeatedly' vs `forever'? Sounds like quibbling to me.

> But (unlike the Boolean
> data type) the extra effort of becoming familiar with this
> usage does not seem to be adequately repaid in clearer code.
> (Of course that's a judgement call..)

I agree. My `handy.h' usually include a forever define which is forever 
unused. I just never remember to type it instead of `for(;;)'.

	jim		cottrell at nbs

More information about the Comp.lang.c mailing list