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

Re: Tim Sweeney on Programming Languages



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.

Perhaps the word 'virtual' has too many C++ associations, and implies that
you have to declare in the base class that something can be overridden.
Fortunately that practice doesn't extend much beyond C++.

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.

Thinking about it, this is something that can even be supported outside of
the language. It could be supported at the IDE level by some grouping
mechanisms and some clever substitution of classes during compilation.
Though you would have standarization problems that way, it could be
implemented in a couple of weeks by someone familiar with the innner
workings of the IDE. No rocket science required.


Maarten






Follow-Ups: References: