Posts tagged Language

Generics: Parameters, Wrappers and template-specialisation

Castle supports Generics (a bit like Templates in C++) but with a twist. For example, in (the improved version of) “The Sieve (basic variant)” we use the SlowStart (base)protocol as a Generic protocol.

It becomes generic as we pass an Argument to the base class. Only that makes SlowStart a generic!
It is not visual in the definition.

As this differs from other languages, it gives some questions. We will explain how to use it. And make some (high-level) hints on the implementation.

Read more ...