[net.lang.c] Forever

cottrell@nbs-vms.ARPA (COTTRELL, JAMES) (10/01/85)

/* 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@nbs
*/
------

mikel@codas.UUCP (Mikel Manitius) (10/10/85)

> /* 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).

This reminds me of something a known Labs mind pointed out to me once:

There is no such thing as an "infinite loop" in programming,
only "indefninite loop".
-- 
                                        =======
     Mikel Manitius                   ==----=====    AT&T
     (305) 869-2462 RNX: 755         ==------=====   Information Systems 
     ...{akguc|ihnp4}!codas!mikel    ===----======   SDSS Regional Support
     ...attmail!mmanitius             ===========    Altamonte Springs, FL
     My opinions are my own.            =======