[MUD-Dev] Re: PDMud thread summary

Bruce Bruce
Mon Oct 26 20:43:49 New Zealand Daylight Time 1998

On Monday, October 26, 1998, Jon A. Lambert wrote:
> On 26 Oct 98, Alex Oren wrote:
> > Personally I think that it should be language-independent so modules
could be
> > written in any language.  This will probably add some programming
overhead to
> > non "native" programming but I think the flexibility is worth it.
> >
> > I kinda like the Self object model (but not the syntax of the language).
> > See http://self.smli.com/ for info.
> Self has pretty 'heavy' objects.  Instead of class concepts there are
> prototype objects.  It has been done in ColdC.  IMO, if the Self
> model was sufficient, there would have been no desire or need for
> Cold's $frob construct.

I personally feel that the frob datatype (in addition to being fairly hard
for most people learning ColdC to learn) is fairly well mis-understood.  It
is closest to being the way to implement abstract datatypes, where you want
all method calls regarding that data to be routed to a particular object.
It is also highly useful, because of the method handler, for implementing
proxies for remote objects.  It is currently used as a lightweight object in
some code, which isn't really where its strength is.

The syntax for a literal frob is:  <object, data, handler> where the handler
is optional.  With a frob without a handler, any call made get transformed:
frob.method(args) => object.method(data, args)   ....  While this looks
fairly, odd, it has uses within the structure of Cold.  Where it gets
interesting is when there is a method handler, the call gets transformed
like this:  frob.method(args) -> object.handler(data, method, args) ... With
this, you could have something like so:

<$distributor, #[['object, $blah], ['home_system, "ice.cold.org:1150"]],
'proxy_handler>, so that any calls made on that frob would get transmitted
over the network by the $distributor object.

The method handler could also possibly provide some agent-oriented
programming capabilities, but that is probably a bit of a stretch.

BTW, MOO has something similar that someone was working with (not in a
released server, but has been mentioned on MOO-Cows) in the WAIF datatype

 - Bruce

More information about the MUD-Dev mailing list