[MUD-Dev] Re: DevMUD: Inheritable modules

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Fri Oct 30 20:13:59 New Zealand Daylight Time 1998

[James Wilson:]

 >What are people's thoughts on this? Should we try to come up with something 
 >"language agnostic", as the Casbah project (built on Gamora - see Nick's post
 >of his communique from the Gamora guy for a pointer) is attempting to do using
 >Scheme? There were some interesting messages on their mailing list about
 >troubles they were having with language agnosticism, which I will attempt to
 >find again and post to mud-dev.

I think its good to try to avoid shutting out other languages, but we
shouldn't worry about it too much. Since a lot of code nowadays uses
simple C calling conventions, that is a fairly portable setup. As an
example of where (just picking an example, not trying to bash C++)
using a proprietary interface caused problems, consider the early BeOS.
They were stuck with the C++ conventions of one vendor's compiler, and
that caused a lot of moaning and groaning. When I still followed that
stuff (is Be still alive?), I was espousing an actual ABI (Applications
Binary Interface) rather than just an API (Applications Programming

Most UNIXes have an ABI. Its sometimes hard to dig out, but a little
work can find it for you. AmigaOS had one, and that system had lots of
languages ported to it quickly (including mine!). I don't know that we
want to go quite as far as AmigaOS did (all parameters were specified
to go in specific registers), because it was a pain. However, perhaps
we can simply determine the standard C calling methods for each platform,
and make that the ABI for that platform. This has the advantage that
most people won't have to write any interface stubs, and we can likely
get away without documenting the ABI, other than at the API level.

One minor note here. C is one of the very few languages that support
a varargs style call. We might want to prohibit that in the API, or at
least always provide alternatives.

Don't design inefficiency in - it'll happen in the implementation. - me

Chris Gray     cg at ami-cg.GraySage.Edmonton.AB.CA

More information about the MUD-Dev mailing list