MOO-cows Mailing List Archive


Re: [MC] Multiple Inhertiance

While getting mad at everyone for obsession about this MI thing, I figured
I'd throw my $0.02 in.

Yeah, I have even made a few MI generics here and there... it was a hot
subject, so of course, I attempted it, as with the many versions of in-db
parsing.  The main problem with my generics was that I couldn't think of
anything to test them with... I was unable to find any reason to merge two
parents.  The only reason a merge would be necessary is because of bad

1) Whatever basic object functions you write, stick them on a $util.  That
way, everyone can use it without wishing for MI.
2) If you want 2 sets of commands from 2 objects to be inherited, write your
own in-db parsing.  The simple ones that will do something like this are a
piece of cake.
3) Don't put such rough perm checks on verbs.  So what if the server didn't
call $server_started()... just make sure there is no harmful code in there,
and if so, make it require that a wiz or $nothing calls the verb.  (I know,
I know, bad example...  How about $do_command() for example... if your moo
uses 100% in-db parsing, it is a nice way to force a command, even if
someone is in a read().)
4) Use !d verbs.  If it isn't that important, use an E_PROPNF check to see
if it's the right parent, not :isa().  This way, objects that don't have the
recommended parent can still be used.  For example, $food with a .drink
property, like the "generic edible cup," can be filled at the $faucet...
Besides, I hear that !d verbs run (a little) faster.
5) Make as many verbs +x as possible, and put the necessary perm checks in them.

...and oh yeah...  I vote NO for MI as well.

- Kipp
GCS/CC d- s+:- a16 C++ UL++++ P+ L++ E-? W+ !N--@ !o-- K->K++++++
w++(--) O- M-- V--? PS++(+) PE(--) Y+ PGP-? t+ 5(+) X++ R+++(*)
!tv b+ DI++++ D++++ G e* h!()(*) r+ !y+
MOO projects:
  Breakthrough MOO project: 5000
  MOO2000:          2000
  MundoHispano:     8888

Home | Subject Index | Thread Index