Subject: More break stuff..

From: [email-masked] (A VAX's nightmare)
Date: Wed, 12 May 1993 15:17:16 -0700

Well, since this seems to be a hot topic, I thought I'ld throw in my two
cents. (This makes the pot what? $2.50?)

If anything like break and continue are implemented, I would prefer that
they be as close to the standard C usage as possible as this is logical
and effective in %95 of applications. If I understand the code in execute.c
correctly, for a break, all that would need to be done when it is encountered
is to go back to the stack and keep popping off entries until you come to an
end*. In the case of a break from inside any other statement, it could
be treated as a return with no argument.

[So how close am I?]

As for continue, well, it may require slightly more manipulation since its
only completing an iteration of a loop rather than breaking out of it.
And since I haven't gone through enough of the code to understand whats
going on in this case, I can't really comment on an implementation.

Anyhow, in this manner, it seems quite workable to me at least. Comments?

-Wayne/Sadric@LambdaMOO

---

From: Pavel Curtis <[email-masked]>
Date: Wed, 12 May 1993 15:40:32 -0700

> and effective in %95 of applications.

I'm not at all convinced that C is a very good example of language design.
Remember, it's not popular because it's good, it's popular because there was an
essentially free implementation at the right time.

In any case, the issue is not how to implement it (in fact, it's both easier
and harder than you make it sound; the actual emitted virtual machine
instructions could just be some pops and a branch, but there are also issues
involved with decompiling the object code back into source code again) but what
the construct should look like to the programmer.

	Pavel