The current Erg polymorphic type is denoted as K(T), but K[T] is more reasonable.
First, polymorphic types are not functions; Class is a true type-level function that takes a type and returns a class, while Array, for example, is not.
Second, it is incompatible with Python's syntax: Python's syntax for polymorphic types is K[T], and K(T) covers the syntax for creating an instance of class K.
The current Erg polymorphic type is denoted as
K(T)
, butK[T]
is more reasonable. First, polymorphic types are not functions; Class is a true type-level function that takes a type and returns a class, while Array, for example, is not. Second, it is incompatible with Python's syntax: Python's syntax for polymorphic types isK[T]
, andK(T)
covers the syntax for creating an instance of classK
.