Subject: [H. Peter Anvin N9ITP: Re: Lack of EXITFOR]

From: Pavel Curtis <[email-masked]>
Date: Tue, 11 May 1993 15:58:32 -0700

I think Peter intended to send this to MOO-Cows, not to me personally.

	Pavel

------- Start of forwarded message -------
Date:	Mon, 10 May 1993 20:25:50 -0700
From:	[email-masked] (H. Peter Anvin N9ITP)
To:	[email-masked] (Pavel Curtis)
Subject: Re: Lack of EXITFOR
Reply-To: [email-masked] (H. Peter Anvin)

> 
> > Date:	Mon, 10 May 1993 14:17:28 -0700
> > From:	Kent Pitman <[email-masked]>
> > 
> > I was told that Pavel had given in to people who purported to represent
> > "goodness and purity of essence" in language design and who had claimed
> > that EXITFOR was the Devil's work, and that he had bought into that 
> > religion.
> 
> You were told wrongly; in fact, I attempted on this list some time ago to get
> some help in designing a good such construct but was unsuccessful.  Take a look
> in the archives (parcftp.xerox.com:pub/MOO/mail/MOO-Cows-199*.mail) for the
> discussion of BREAK and CONTINUE, probably in 1992.
> 
> 	Pavel
> 

How about an extended C-style:

	break <n>;
	continue <n>;

Where <n> marks the # of loops to break out of, may they be for, while
or repeat loops (defaults to 1).

>From what I heard from people, this construction would be a Good
Thing.

Also, a in-db comment statement would definitively be nice.

	/hpa

For the benefit of the uninitiated:

Break equals an unconditional jump to just after <n> loop termination
statements (net, i.e. minus any new loop initiation statements).

Continue equals an unconditional jump to just *before* the <n>:th net
loop termination statement.

- -- 
INTERNET:  [email-masked]    FINGER:    [email-masked]
BITNET:    HPA@NUACC      IBM MAIL:  36073 at IBMX400
HAM RADIO: N9ITP, SM4TKN  NeXTMAIL:  [email-masked]
Most inappropriatly named startup command, winner:  Microsoft Windows

------- End of forwarded message -------

---

From: [email-masked]
Date: Tue, 11 May 1993 16:18:44 -0700

> How about an extended C-style:

publicly used code on MU*s gets garbled and mangled enough without adding
this dubious 'feature' to allow people to write BASIC-style.

call me a 'whiney software purist' or whatever, but there's generally a reason
for using structured programming languages instead of label/goto/break/etc...
On a MU*, when someone goes in to change one of the big, ugly programs you
wrote, sticking part of code inside of a new level of
conditional/loop/whatever, suddenly everything breaks since you had put
in continue 5;  instead of continue 6;  ... and debugging that is a HUGE
nightmare.  if, instead, you spend the extra five minutes to ensure the
indepenedence of scoping levels the FIRST time it's written, this problem
never arises.

if i wanted to see unreadable hack-code, i'd go to MUSH or LP.  ;-)

(just my 2 cent vote.)

-traumahound  (firm believer that what people think they want isn't necessarily
               what's best for the Moo as a whole... ooh, sounds scary: "We
               know what's best for you..." :-)

---

From: [email-masked]
Date: Tue, 11 May 1993 23:02:01 -0700

>               know what's best for you..." :-)

I agree. (so now are are at... what... four cents?)

I could further explain and bitch and rant and wax lyrical but, to me, the bottom
line is this:

Spaghetti is not good for computers.

Not allowing programmers to write anything BUT well structured code is in the
insterests of cpu and anyone trying to figure out the code.

If introduction of these commands ARE included, I request also adding a compiling
flag that can disable these commands.

Cassnak