[gambit-list] Meroon

Christian Jaeger chrjae at gmail.com
Tue Mar 2 16:01:03 EST 2010


> Thanks, Christian.  I don't need multiple inheritance; I think it
> generally is bad design anyway.  Meroon is really fast and the most
> sophisticated one I've seen, but I will check out Oops.  I'm writing a
> scene graph and it'll be fun to run some benchmarks soon.

The point of Oops is not to be faster than Meroon in the
single-inheritance case! So doing those benchmarks probably won't make
much sense.

I've once written an object system in Perl (based on arrays instead of
hashes, using integer constants as field names, for compile-time typo
checking and "performance") and thought that single inheritance should
suffice; only a couple years later I wanted to implement an object
hierarchy with multiple implementations and realized that I needed
multiple inheritance; I hacked around the object system and added the
common classes ("interfaces") to the inheritance tree manually, and
luckily Perl would still allow code in those common classes, but I was
unable to add fields there. That project never became a success, and
so it didn't matter so much, but I implemented a new object system
layer for Perl later (there are so many of those in the meantime that
it didn't really matter anymore whether I'd create another one),
providing for multiple inheritance, and using the only implementation
strategy there is for it on Perl, hashes; of course I would still use
the old system for all existing classes, because the way objects were
implemented (array access) would mean I'd have to change the syntax of
all field accesses...  Maybe what this taught me was that you can't
foresee what you need and what not. (And that abstract syntax is a
good thing.)

I'm not claiming that you'll need MI (*), but you better be prepared
to adapt your code once you do.

Christian.

(*) there *may* be alternatives



More information about the Gambit-list mailing list