1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: PDMud thread summary -->
<!--X-From-R13: nyrkbNovtsbbg.pbz (Oyrk Aera) -->
<!--X-Date: Tue, 27 Oct 1998 01:50:41 &#45;0800 -->
<!--X-Message-Id: 36368575.35858101@neptune -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199810270610.XAA03719@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: PDMud thread summary</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:alexo#bigfoot,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="msg00547.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00549.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00540.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00559.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00548">Author</A>
&nbsp;|&nbsp;<A HREF="#00548">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00548">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: PDMud thread summary</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: PDMud thread summary</LI>
<LI><em>From</em>: <A HREF="mailto:alexo#bigfoot,com">alexo#bigfoot,com</A> (Alex Oren)</LI>
<LI><em>Date</em>: Tue, 27 Oct 1998 09:47:14 GMT</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 Mon, 26 Oct 1998 23:10:52 -0700, Chris Gray wrote:

} [Alex Oren:]
} 
}  &gt;I think we should look into the object model first.
}  &gt;Do we want single or multiple inheritance?  Static or dynamic binding?  Single
}  &gt;or multiple dispatch?  Vtables or name-based?  Etc...
} 
} I'll admit ignorance again. What does single or multiple dispatch apply
} to? I can guess at what you are meaning by static versus dymamic
} binding, but I suspect my interpretation won't be what you intend. So,
} could you provide brief explanations of what you mean by all this
} jargon? (Well, to me the first and last are clear enough.)

Hmmm...

[Warning: gross simplifications (and possibly minor inaccuracies) follow]

OK, let's start with the easy one.

Static binding is when the destination of a function call is known at compile
time.  Dynamic binding is when the destination is only known at run-time.  In
C++, dynamic binding is accomplished using virtual methods and pointers or
references to objects.

C++ examples:

    class Base {
    public:
        void F() { /* do something */ }
        virtual void VF() { /* do something */ }
    };

    class Derived: public Base {
    public:
        void F() { /* do something */ }
        virtual void VF() { /* do something */ }
    };

    int main() {
        Base b;
        Derived d;
        Base&amp; ref = d;
        Base* p = &amp;d;

        b.F();      // Static binding
        d.F();      // Static binding
        b.VF();     // Static binding
        d.VF();     // Static binding
        ref.F();    // Static binding
        ref.VF();   // Dynamic binding, Derived::VF() called
        p-&gt;F();     // Static binding
        p-&gt;VF();    // Dynamic binding, Derived::VF() called

        return 0;
    }

C++ accomplishes static binding by direct CALL commands and dynamic binding
via indirect calls through a virtual function table.

In some other OO languages (Smalltalk, Self, etc.) you can send ANY message to
ANY object.  This is much more flexible.

Now, to multiple dispatch.  Multiple dispatch is what Scott Meyers (More
Effective C++) calls "Making functions virtual with respect to more than one
object".  C++ and Java do not support this paradigm directly but there are
ways to simulate it.

Some references:
    <A  HREF="http://www.cs.monash.edu.au/~davidc/muldisp/muldisp.html">http://www.cs.monash.edu.au/~davidc/muldisp/muldisp.html</A>
    <A  HREF="http://g.oswego.edu/dl/oosd/ch21.html">http://g.oswego.edu/dl/oosd/ch21.html</A>

Have fun,
Alex.


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00540" HREF="msg00540.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
<UL><LI><EM>From:</EM> Chris Gray &lt;cg#ami-cg,GraySage.Edmonton.AB.CA&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00547.html">[MUD-Dev] Re: OT, kinda, but yay :)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00549.html">[MUD-Dev] Re: MUD verb handling (Was: DevMUD - thoughts.1)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00540.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00559.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00548"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00548"><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: PDMud thread summary</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00537" HREF="msg00537.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Bruce Mitchener, Jr. <a href="mailto:bruce#puremagic,com">bruce#puremagic,com</a>, Tue 27 Oct 1998, 04:45 GMT
<UL>
<LI><strong><A NAME="00656" HREF="msg00656.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 01 Nov 1998, 04:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00539" HREF="msg00539.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 27 Oct 1998, 06:05 GMT
</LI>
<LI><strong><A NAME="00540" HREF="msg00540.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 27 Oct 1998, 06:13 GMT
<UL>
<LI><strong><A NAME="00548" HREF="msg00548.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Tue 27 Oct 1998, 09:50 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00559" HREF="msg00559.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 28 Oct 1998, 04:14 GMT
<UL>
<LI><strong><A NAME="00565" HREF="msg00565.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Wed 28 Oct 1998, 13:40 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00345" HREF="msg00345.html">[MUD-Dev] PDMud thread summary</A></strong>, 
Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Thu 22 Oct 1998, 08:39 GMT
<UL>
<LI><strong><A NAME="00349" HREF="msg00349.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Thu 22 Oct 1998, 12:06 GMT
</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>