[1609] in Coldmud discussion meeting

root meeting help first previous next last

Frobbed method calls

daemon@ATHENA.MIT.EDU (Sat Jul 15 18:49:56 2000 )

Date: Sat, 15 Jul 2000 15:41:53 -0700 (PDT)
From: Jeremy Weatherford <xidus@xidus.net>
To: coldstuff@cold.org
Reply-To: coldstuff@cold.org


Is there any reason why the representation of the frob is passed to
methods not having the frob flag, during a frobbed method call?  IE, $root
has a method ancestors(), which takes no args.  $frob is a child of $root,
and we'll say that var thingy = <$frob, #[['rep, 'whatever]]>.  Why should
'thingy.ancestors()' pass '#[['rep, 'whatever]]' to the method ancestors()
on $root, since $root.ancestors() doesn't have the 'frob' method flag?
Calling 'thingy.ancestors()' should be the same as '$frob.ancestors()',

Obviously, if there was a $frob.frobnitz() method having the 'frob' method
flag, then 'thingy.frobnitz()' should pass the representation as the first
argument (the one usually called 'this' in frob methods)

The change proposed, thus, is:

  Frobbed method calls (where the target is a frob) would be changed to
  not pass the representation as the first argument unless the method
  has the 'frob' flag.

What would this break?  I'll poke around in my copy of the hardcode and
see if I can figure out how to do this.  Is this just a really, really bad
idea, for some reason I haven't thought about yet?

Jeremy Weatherford