Subject: MOO language extensions/additions

From: Chad Wilson <[email-masked]>
Date: Tue, 11 May 1993 11:45:00 -0700

I like the idea of the EXITFOR statement, but I think it should be extended
further to all loops, even the while loop.

Another command:  skip
i have found it would be nice to skip one line or two instead of creating a
huge if-then-else-endif stucture to do teh same thing.  It's kinda like a goto
command that excepts the amount of lines to skip.

How about compiling the MOO code into machine code?  How much work is there to
it?  I don't know.

- Chad Wilson

---

From: Mike O'Brien <[email-masked]>
Date: Tue, 11 May 1993 12:20:33 -0700

>How about compiling the MOO code into machine code?  How much work is there to

It's true that under some software architectures, this is a good idea.
ParcPlace Smalltalk does this, and the system is far faster than the original
bytecode-interpreted Smalltalk reference architecture.

As each method is invoked, the byte-codes are translated on the fly into
executable machine code, which is kept in a "native-code cache" in the
virtual machine (in MOO's case, the server).  Future invocations of the
method require only a lookup of the class of the receiver, to see if
it matches that of the cached code; if so, the method is executed in
machine code with no further ado.

This requires the creation of a platform-specific bytecode-to-machine-code
translator for each desired platform, however - not a small investment.
You have to really _want_ this kind of performance.

Mike O'Brien

---

From: Pavel Curtis <[email-masked]>
Date: Tue, 11 May 1993 16:11:12 -0700

> Date:	Tue, 11 May 1993 11:45:00 -0700
> From:	Chad Wilson <[email-masked]>
> 

I think that this was the intent.

> huge if-then-else-endif stucture to do teh same thing.  It's kinda like a
> goto command that excepts the amount of lines to skip.

Not to put too fine a point on it, but this strikes me as a truly awful
construct.  Write the if-endif statement; people reading your code will thank
you for it.

> How about compiling the MOO code into machine code?  How much work is there
> to it?  I don't know.

This would be a lot of work and probably wouldn't get you all that much
performance, since the MOO language has so many frequently-used constructs that
require non-trivial security checks (e.g., reading the value of a property,
calling a verb, etc.).

	Pavel