Does Lava support design patterns?

The answer is yes, and this is one of the most important and advanced features of Lava.

Lava provides particular support for groups ("packages") of interrelated classes that refer indirectly to one another through type parameters ("virtual types"). The Lava derivation notion applies not only to classes, but also to such parameterized packages. In a derived package more derived classes will be assigned to the virtual types / type parameters of the package.

It is well known that such a virtual type approach is more appropriate than the traditional template / parametric types approach for describing groups of interrelated classes with common type parameters. Many design patterns are based on such groups of interrelated classes.

Nevertheless the recent proposals concerning genericity enhancements for the Java language are based on the older parametric types approach, presumably because it is easier to incorporate it in the existing Java language without or with only minor changes to the Java Virtual Machine.

We believe that in a new experimental language like Lava the virtual type approach should get a real chance to show its apparent advantages.

See our section on patterns/frameworks and our pattern samples for more details.