Introduction to OOP Chapter 18: Generics : next previous audio real text

Bounded Genericity

Some languages (Eiffel, others) allow the programmer to place a type on the template argument:
class
	Hash_Table [ H -> Hashable ]
	...
The restriction says that the argument (here named H) can only be a subclass of Hashable.

This feature allows the compiler to do stronger type checking, and produce more meaningful error messages.

Intro OOP, Chapter 18, Slide 06