"Paul Brannan" <pbrannan / atdesk.com> wrote in message
news:8x%67.13416$YK4.1122835 / e420r-atl1.usenetserver.com...
>
> This obviously doesn't work for multiple inheritance, but can be pretty

Actually it does work for multiple inheritance in the sense that this is
exactly what most C++ implementations do. But it is problematic, and I guess
Ruby and other "new" languages chose right in dropping multiple inheritance.
While inheritance has some elements that makes them worthwile, I'd be happy
living without them, as long as I get to keep a kind of interface behaviour
and object type identification (which an interface is). Uh oh Ruby is
missing something here... I'll write another post on this.

Despite my previous point, I do not really approve the GTK approach. Why on
earth not implement the stuff in C++ when that is what you are trying to do.
Choose the right language for the right job. The Fox toolkit deliberately
chose C++ for that reason.

> powerful if used correctly (the GTK_CHECK_CAST macro actually does
> run-time type checking if you compile with the right flags set).  I don't
> know any easy way to do MI in C without using pointers, as you suggested.

Just embed multiple structs, define a cast macro to access the proper base.
This will manipulate the pointer, but so it does in C++.

Mikkel