[Prev][Next][Index][Thread]

Re: Tim Sweeney on Programming Languages



Maarten Hazewinkel <Maarten.Hazewinkel@bit-ic.nl> wrote:

> In article <200002071845.NAA18229@life.ai.mit.edu>,
> Michael Schuerig <schuerig@acm.org> wrote:
> 
> >I agree in principle, but not in practice. The mechanism that Sweeney
> >proposes is not much better than interfaces and factories. The point is
> >that both require forethought. You have to explicitly use his "virtual
> >classes" to reap their benefits. If you didn't think of this, you're as
> >much out of luck as with any other approach.

> I see nothing in Sweeneys idea that requires a declaration in the classes
> of the base framework to allow them to be used as virtual classes. Not even
> the framework declarations need to be provided by the writer of of original
> classes. You can simply take a group of classes (a library) and declare
> that to be the base framework, then derive your own framework from that.

>From <http://www.gamespy.com/articles/devweek_e.shtm>:

<QUOTE>
Now, a virtual class is "an innner class declared within a base class,
which can be overridden with a 'more specific' version in a child
class."
</QUOTE>

In my view this means that one has to take specific action for "virtual
classes" to work. The surrounding base class is parameterized by them
and you have to consider beforehand whether you want this
parameterization.

Michael

-- 
Michael Schuerig
mailto:schuerig@acm.org
http://www.schuerig.de/michael/



Follow-Ups: References: