T/type keyword



T <type name>
   String s // type variable
   . String ps // private variable [rationale: dot is used for hidden files and folders in Unix]
   F (s) // constructor
      .s = s
   F get_s_len() // type function
      R .s.len

[Because
T
and
type
are keywords in 11l, use can use
Ty
and
type_name
instead.]



Type aliases


T Tuple2[T Ty] = Tuple[Ty, Ty]


T/type subkeywords



T.enum
/
type.enum
is used to declare an enumeration, a distinct type that consists of a set of named constants called the enumerator list.
T.enum TokenCategory
   NAME
   KEYWORD
   CONSTANT
   TEST_CATEGORY = 10
[Enumerators
NAME
,
KEYWORD
and
CONSTANT
have values 0, 1 and 2 respectively.]


T
/
type
also has subkeywords
base
and
interface
, but they are not supported yet.