[MUD-Dev] Virtual machine design
Chris Gray
cg at ami-cg.GraySage.Edmonton.AB.CA
Sat Apr 17 10:21:21 CEST 1999
[Ben Greear:]
>4) I think it would be pretty cool to implement such a system, just for the
>sake of coding it up, but I don't see the practical benefits. Please
>enlighten me! :)
My reasons aren't before-the-fact reasons, but are advantages noted after
it had been accomplished. I was working on interpreters when the idea of
putting a MUD around one came up.
- if your MUD is disk-based rather than memory based, you need accessor
functions to get at things. When you are planning on thousands of
lines of code, its tedious and error prone to have to write those
calls all over the place. Having an in-MUD language means that the
code can be visually simpler, and the compiler takes care of all of
the details. C++ users might be able to cleanly hide all of that
stuff, but that wasn't an option for me.
- MUD languages often have security considerations, such as doing things
on function entry. Having an in-MUD language makes this automatic,
rather than manual.
- the datatypes that are useful for MUDs are often not directly present
in implementation languages. E.g. flexible arrays with full bounds
checking, a seamless string type, etc. Many of the things that, say,
C++ has, you likely want your MUD programmers to *not* have access
to, like pointers. Or maybe Java's networking and file I/O functions.
- with an in-MUD language, it is often possible to modify things while
the MUD is up and running. That is much trickier if you are using
normal compiled code, on a function-by-function basis.
- although I'm a fan of strongly typed languages (compiler, please help
me get this right...), there are cases when run-time type checking
is valuable - that requires entire additional frameworks of stuff
if done in traditional compiled languages.
- I wanted an inheritance model that inherits values, not structure. That
doesn't work if the implemenation language does inheritance of
structure, like C++ and Java do.
- C syntax, and hence C++ and mostly Java syntax, well sucks. I'd rather
have something cleaner to present to beginner programmers.
There are likely more, but that's all that come to mind at the moment.
--
Don't design inefficiency in - it'll happen in the implementation.
Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
http://www.GraySage.Edmonton.AB.CA/cg/
_______________________________________________
MUD-Dev maillist - MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list