Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #16388
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: EuroForth 2012 proceedings |
| Date | 2012-10-17 14:15 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2012Oct17.161512@mips.complang.tuwien.ac.at> (permalink) |
| References | (1 earlier) <507d495f$0$289$14726298@news.sunsite.dk> <2012Oct16.182021@mips.complang.tuwien.ac.at> <2268724.XZ4vdR9vIK@sunwukong.fritz.box> <507dd029$0$290$14726298@news.sunsite.dk> <2589967.XU4GPribo4@sunwukong.fritz.box> |
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Doug Hoffman wrote:
>
>> On 10/16/12 2:13 PM, Bernd Paysan wrote:
>>
>>> For MI, you AFAIK need two things: The actual xt of the method, and
>>> the offset to adjust the object pointer when you call the method.
>>
>> Yes. The tricky part can be when you are multiply inheriting from
>> classes that themselves are multiply inherited. It's an interesting
>> problem to solve.
>
>The solution, as I tried to explain, is to convert each inheritance into
>wrapper methods that work as if the class was created through single
>inheritance. That way you only pay the cost of adjusting the offset
>pointer when it's not the primary inheritance, and everything looks like
>SI from the outside.
That's the C++ solution IIRC. If you are interested in implementing
multiple inheritance, read Roland Ducournau' papers, which discuss
several ways to implement it.
However, I wonder is if we need MI. Maybe already things like
objects2, objects.fs, and bernd-OOF are too big and too general, and
most needs are satisfied with something like mini-oof, but with
THIS/SELF.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2012: http://www.euroforth.org/ef12/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-15 16:40 +0000
Re: EuroForth 2012 proceedings Mark Wills <forthfreak@gmail.com> - 2012-10-16 01:38 -0700
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 07:47 -0400
Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-16 16:20 +0000
Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-16 20:13 +0200
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:22 -0400
Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 01:29 +0200
Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 01:49 +0200
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-17 06:29 -0400
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-19 10:16 -0400
Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-17 14:15 +0000
Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 17:14 +0200
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-19 09:57 -0400
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-24 08:50 -0400
Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-17 13:29 +0000
Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 17:31 +0200
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:20 -0400
Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:25 -0400
csiph-web