> I really like how parameterized data-structure types are handled by traits:
> c = List(Tuple(Int, String), Instance(A))
> Why isn't this approach also used to trait-type Functions (and Methods, Callables, ...) by their argument and return types?
> class A:
> i = Int
> s = String
> f = Function(args=(Int, String, List(Int)), return=List(String))
Do you mean decorating methods to type-check their arguments and
returns? We used to have a decorator that does this. We never found it
to be useful, so it has not been maintained. It may still work, but I
don't recommend using it.