1. A method for generating executable code, comprising: receiving source code, wherein the source code can include declarations for types and operations, wherein the type declarations may be parameterized, and wherein the source code may specify subtyping relationships between declared types; and compiling or interpreting the source code to produce executable code, wherein the type parameters may be instantiated by different types during execution, and wherein the result of executing operations may depend upon the instantiations of the type parameters; wherein compiling or interpreting source code involves, checking the types and operations in the source code to ensure that the executable code generated is type-safe, and hence will not generate type errors during execution.