| |
| Posted by Bill Cox in reply to Mark Evans | PermalinkReply |
|
Bill Cox
Posted in reply to Mark Evans
| Interesting paper. It seems to show the equivalence of virtual types, template frameworks, etc.
They conclude that with some minor extensions to a language that has templates, you get the power of virtual classes or template frameworks, so long as you are willing to de-couple classes to the point that they are not mutually recursive. That sounds really scary to me. A simple graph is mutually recursive. The systems I work with have litterally a hundred massively recursive classes.
The neat thing about template frameworks (or virtual classes) is that they produce highly efficient code, and they enable code reuse that otherwise is hard to do in languages like C++ and Java.
I think it's a great candidate for D.
Mark Evans wrote:
> http://pauillac.inria.fr/~remy/work/virtual/virtual.html
>
> Abstract: We show, mostly through detailed examples, that object-oriented
> programming patterns known to involve the notion of virtual types can be
> implemented directly and concisely using parametric polymorphism. A significant
> improvement we make over previous approaches is to allow related classes to be
> defined independently. This solution is more flexible, more general, and we
> believe, simpler than other type-safe solutions previously proposed. This
> approach can be applied to several languages with parametric polymorphism that
> can already type binary methods and have structural object types.
>
>
|