1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: DevMUD:  Inheritable modules -->
<!--X-From-R13: Xba Zrbaneq <wyrbaneqNqvipbz.fyvzl.pbz> -->
<!--X-Date: Wed, 28 Oct 1998 15:46:04 &#45;0800 -->
<!--X-Message-Id: 19981028153702.A8875#divcom,slimy.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.981028191312.354B&#45;100000@localhost -->
<!--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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00572.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00574.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00570.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00579.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00573">Author</A>
&nbsp;|&nbsp;<A HREF="#00573">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00573">Thread</A>
&nbsp;]

<!--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 &lt;<A HREF="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 28 Oct 1998 15:37:02 -0800</LI>
<LI><em>Cc</em>: Jon Leonard &lt;<A HREF="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</A>&gt;</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 Wed, Oct 28, 1998 at 07:20:20PM +0100, The Arrow wrote:
&gt; There have been a lot of talk about modules, how to implement them, and how
&gt; to send messages between them.  But so far I haven't seen anything about
&gt; inheritable modules.  I know it wouldn't be trivial to make a good
&gt; implementation, but once done they might make DevMUD even more OO and
&gt; extensible.  What do you think about it?

I don't want to do OO just for OO's sake.  I take the view that different
projects benefit from different programming techniques, and I don't see how
some of them help us here.

So I'll list some Object Oriented properties and which I'd use, and we'll
see what people think.  OO by itself is ambiguous:  C++'s model is different
from Objective C's, which differs from JAVA, CLOS, Smalltalk...

Encapsulation:  We don't want the internals of modules to be important to
	how they get used.  It's just the interfaces that matter.  I think
	DevMUD modules should definitely provide encapsulation.

Interface inheritance:  Useful for making modules interchangable.  Specify
	the interface you want, and any modules that match it (or are a
	superset) will work.  I like this, and plan to use it for a telnet
	module working as a superset of a socket module.

Polymorphism:  Same function, different arguments.  At least conceptually
	the same function.  Exporting multiple things with the same name
	with different function prototypes should be fine in DevMUD.
	(I'm assuming an array of function structures, here.)

Multiple instances:  It's often nice to have more than one of an object.
	Unfortunately, dlopen defeats this.  Calling dlopen on the same
	name a second time just returns the same handle.  If we want this
	functionality in DevMUD, we'll have to impose it as internal module
	structure.

Code inheritance:  Using language support to have calls to one object
	execute code from another.  This one I don't like, because it
	breaks encapsulation.  Consider if I have a class squarestuff,
	which exports two functions:  F, and F_1.  F calculates the
	square of a number, and square_1 calculates the square plus one.
	Reasonable definition, right?  Unfortunately, if I try to inherit
	to make a cube class, and override F, the behavior of F_1 can be
	many things:  It could still be x*x+1, if squarestuff's F_1 didn't
	call F.  It could be x*x*x+1, if it did.  It could be something
	totally different -- squarestuff might mix and use memoization or
	something.  The peculiar interactions that result from code
	inheritance make me try to avoid it.

That's more or less my preferences on OO design as regards DevMUD.  I want to
do this with C function pointers as the basic communication primitive for
flexibility.

Also, there has been some discussion using the simple-minded prototype I
have running on mud.slimy.com on port 2121, so I've upgraded the command
set a bit, tweaked for robustness, and started logging for the purpose of
collecting DevMUD ideas.

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="00579" HREF="msg00579.html">[MUD-Dev] Re: DevMUD:  Inheritable modules</A></strong>
<ul compact><li><em>From:</em> The Arrow &lt;arrow#trelleborg,mail.telia.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00570" HREF="msg00570.html">[MUD-Dev] DevMUD:  Inheritable modules</A></STRONG>
<UL><LI><EM>From:</EM> The Arrow &lt;arrow#trelleborg,mail.telia.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00572.html">[MUD-Dev] Re: Why did it take years?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00574.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00570.html">[MUD-Dev] DevMUD:  Inheritable modules</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00579.html">[MUD-Dev] Re: DevMUD:  Inheritable modules</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00573"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00573"><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="00662" HREF="msg00662.html">[MUD-Dev] Re: DevMUD:  Inheritable modules</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 01 Nov 1998, 06:01 GMT
</LI>
<LI><strong><A NAME="00699" HREF="msg00699.html">[MUD-Dev] Re: DevMUD:  Inheritable modules</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 03 Nov 1998, 04:26 GMT
<UL>
<LI><strong><A NAME="00703" HREF="msg00703.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, 04:59 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00570" HREF="msg00570.html">[MUD-Dev] DevMUD:  Inheritable modules</A></strong>, 
The Arrow <a href="mailto:arrow#trelleborg,mail.telia.com">arrow#trelleborg,mail.telia.com</a>, Wed 28 Oct 1998, 18:23 GMT
<UL>
<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
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>