lotus



previous page: L08) What about garbage collection in BETA?
  
page up: BETA Programming Language FAQ
  
next page: L10) What is the difference between a virtual binding, a further binding and a final binding (i.e. between :<, ::<, and ::)?

L09) How do I create a "parameterized class"?




Description

This article is from the FAQ, by with numerous contributions by others.

L09) How do I create a "parameterized class"?

A parameterized class (a template in C++ or a generic class in Eiffel) is
created in BETA by using the virtual pattern mechanism. The generic
parameter is specified as a virtual attribute of the pattern, and
subpatterns of this patterns may now make further restrictions on the
generic parameter by further binding the virtual attribute. Generic
instantiation is done by either making a final binding of the virtual
attribute, or by instantiating an object directly from the pattern.

 

Continue to:















TOP
previous page: L08) What about garbage collection in BETA?
  
page up: BETA Programming Language FAQ
  
next page: L10) What is the difference between a virtual binding, a further binding and a final binding (i.e. between :<, ::<, and ::)?