<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: DevMUD: Inheritable modules --> <!--X-From-R13: Xba Zrbaneq <wyrbaneqNqvipbz.fyvzl.pbz> --> <!--X-Date: Fri, 30 Oct 1998 14:18:12 -0800 --> <!--X-Message-Id: 19981030141024.A22772#divcom,slimy.com --> <!--X-Content-Type: text/plain --> <!--X-Reference: 19981029164016.B15596#divcom,slimy.com --> <!--X-Reference: 9810292102590P.22929@d185d1e96 --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, [MUD-Dev] Re: DevMUD: Inheritable modules</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:jleonard#divcom,slimy.com"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00601.html">Previous</a> | <a href="msg00603.html">Next</a> ] Thread: [ <a href="msg00584.html">Previous</a> | <a href="msg00604.html">Next</a> ] Index: [ <A HREF="author.html#00602">Author</A> | <A HREF="#00602">Date</A> | <A HREF="thread.html#00602">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] Re: DevMUD: Inheritable modules</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: [MUD-Dev] Re: DevMUD: Inheritable modules</LI> <LI><em>From</em>: Jon Leonard <<A HREF="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</A>></LI> <LI><em>Date</em>: Fri, 30 Oct 1998 14:10:24 -0800</LI> <LI><em>Cc</em>: Jon Leonard <<A HREF="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</A>></LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> On Thu, Oct 29, 1998 at 09:00:20PM -0500, James Wilson wrote: > > On Thu, 29 Oct 1998, Jon Leonard wrote: > >On Thu, Oct 29, 1998 at 06:53:29PM +0100, The Arrow wrote: > > >> It was something like this I thought of when I wrote the mail. > >> The problem with interface inheritance, is how to export the interface. > >> If the modules is written in C++ and we are using external inheritance > >> (as described by Nicklas) the subclassing should be pretty simple. But how > >> should the driver know what interface (and module) to use runtime? > > > >My current thoughts on this: > > > >I don't want to use C++, because it doesn't have the object model I want. > > can you elaborate? More or less what I've said in other messages. You can't change the implementation of a base class without (usually) forcing a recompile, you can't query objects for what methods they support, you need to know object interfaces at compile time. That sort of thing. You can do these things in C++, but you wind up doing it in parallel with the C++ module hierarchy. Why not do it in a language-portable way? My thoughts on the matter would look something like: struct func { name *funcname, void *funcpointer, char *type_info; }; Modules would export an array of these, more or less like this: struct func interface[] = { "get_message", get_message, "char*(char*,int,int,int)" /* more like that */ NULL, NULL, NULL }; Choose your type to name mangling to taste. There might be other elements of struct func, like a documentation string, too. > >An interface should have a name, and an array of function structures > >like those exported by modules, except without the function pointers. > > > >We should have a source verifier that checks that the claimed interface > >(name-mangled version of the function, or whatever) matches the prototype > >of the function pointer. > > > >There should be a separate collection of defined interfaces, so a module > >can just say "I implement interface X" (this can be verified, of course) > > > >This database of interfaces shouldn't be monolithic -- I don't want to have > >to know about all interfaces that someone else might define. > > > >Explicit interfaces shouldn't be needed to make runnable MUDs, just > >helpful in configuring them. > > did you see my proposal for how this could be done very easily in C++? the > mapping is pretty straightforward. The recent one with the modules full of declarations, not the earlier post about using extern "C"? I've read all of the messages on MUD-Dev about DevMUD (usually several times -- it's hard to remember everything reading it only once.) It looked plausible, but my primary point is that if we're going to invent a different model to deal with dlopen sorts of issues, we should invent one that works for C, C++, or nearly any other language. I prefer to write modules in C, and if someone else writes in C++, we should interoperate. Jon Leonard </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="00604" HREF="msg00604.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong> <ul compact><li><em>From:</em> James Wilson <jwilson#rochester,rr.com></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00583" HREF="msg00583.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG> <UL><LI><EM>From:</EM> Jon Leonard <jleonard#divcom,slimy.com></LI></UL></LI> <LI><STRONG><A NAME="00584" HREF="msg00584.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG> <UL><LI><EM>From:</EM> James Wilson <jwilson#rochester,rr.com></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00601.html">[MUD-Dev] Re: Recursive look</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00603.html">[MUD-Dev] Re: META/ADMIN: CVS for DevMUD security</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00584.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00604.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00602"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00602"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>[MUD-Dev] Re: DevMUD: Inheritable modules</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00573" HREF="msg00573.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Wed 28 Oct 1998, 23:46 GMT <UL> <LI><strong><A NAME="00579" HREF="msg00579.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, The Arrow <a href="mailto:arrow#trelleborg,mail.telia.com">arrow#trelleborg,mail.telia.com</a>, Thu 29 Oct 1998, 17:56 GMT <UL> <LI><strong><A NAME="00583" HREF="msg00583.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Fri 30 Oct 1998, 00:48 GMT <UL> <LI><strong><A NAME="00584" HREF="msg00584.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Fri 30 Oct 1998, 02:14 GMT <UL> <LI><strong><A NAME="00602" HREF="msg00602.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Fri 30 Oct 1998, 22:18 GMT <UL> <LI><strong><A NAME="00604" HREF="msg00604.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Fri 30 Oct 1998, 23:58 GMT <UL> <LI><strong><A NAME="00682" HREF="msg00682.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Mon 02 Nov 1998, 10:17 GMT <UL> <LI><strong><A NAME="00696" HREF="msg00696.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Tue 03 Nov 1998, 03:18 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </UL> </LI> <LI><strong><A NAME="00592" HREF="msg00592.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>, Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Fri 30 Oct 1998, 13:15 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>