Previous Table of Contents Next


4.3.6 Parametric Form


   Some class instances have a conventional order for the values of certain attributes, which makes it unnecessary to give the names of those attributes. For example cartesian coordinates have numeric values named X and Y, but are often represented as two comma separated numbers (2, 4), where it is well known that the first value represents X and the second represents Y. The form of their representation resembles actual parameters to a function or method, and is hence called parametric form.

   A configuration of a class for an HUTN language may include a list of attributes whose values will appear in the class instance header, in parentheses after the class identifier, and before the class body. The parametric attribute values will be represented in the same way as multi-valued attributes; that is, separated by whitespace or commas. These attributes will then be omitted from the class body.

   To make the parametric form simple and consistent, attributes nominated by a parametric configuration may not be multi-valued, and may not be optional. In addition, these attributes may not have default values, as each class instance will have explicit values given for each parametric attribute every time.

   Attributes having parametric form within a class are configured using the ParametricConfig metaclass (see 5.1.9, “ParametricConfig?).