The Cecil Language: Specification and Rationale, Version 2.1
list
and array
that differ only in the declared type of the collection's elements. Similarly, control structures such as if
and map
can be reused for a variety of argument types. Accordingly, Cecil supports the definition of parameterized object representations, method and field implementations, types, and signatures.
The next section describes Cecil's mechanism for explicit parameterization. Section 4.2 introduces Cecil's mechanism for implicit parameterization, and sections 4.3 and 4.4 describe aspects of this feature in more depth. Section 4.5 explains the interaction between parameterized objects and method lookup, section 4.6 explains the interaction between parameterized constructs and the object
and method
syntactic sugars. Section 4.7 discusses Cecil's version of F-bounded polymorphism.
Note: the mechanisms for parameterization in Cecil are being redesigned, using a more explicit and expressive constraint-based core. Programs using the mechanisms described in this section continue to be supported by the new type system. Part of the work on the new parameterization mechanism includes a more precise description of the type system and its checking rules.
Generated with Harlequin WebMaker