[Vm-dev] Why Interpreter subclass ObjectMemory ?

Mariano Martinez Peck marianopeck at gmail.com
Mon Feb 15 14:24:52 UTC 2010

On Thu, Feb 11, 2010 at 1:55 PM, David T. Lewis <lewis at mail.msen.com> wrote:

> On Thu, Feb 11, 2010 at 10:19:34AM +0100, Mariano Martinez Peck wrote:
> >
> > I ask without knowing anything of the background or context. I have just
> saw
> > it and I cannot understand very much why it is like that. I ask myself if
> > composition would be better.
> > Probably is something related to SLANG, but I don't know.
> Yes, that is right. Organizing the Interpreter as a subclass of
> ObjectMemory
> makes things simpler for the C code generator, which creates one C module
> for all the methods in Interpreter and its superclasses. I think this was
> probably a case of doing the simplest thing that could possibly work.

Thanks Dave. I am trying to understand, that's all. So...suppose I want to
have an instance of ObjectMemory as an instance variable of Interpreter and
delegate to it instead of inherit, this won't work with SLANG?   I image
that inter.c has both Interpreter and ObjectMemory because of the
inheritance. Then, if I do what I said, SLANG, or the translator, or the
someone I don't who, cannot correctly put everything together in a inter.c
in the same way it is done right now ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100215/41279176/attachment.htm

More information about the Vm-dev mailing list