(no title)
NateDad | 6 years ago
I guess what you can't do by just using the contract name is say that two arguments must be of the same type. Nevermind.
NateDad | 6 years ago
I guess what you can't do by just using the contract name is say that two arguments must be of the same type. Nevermind.
msbarnett|6 years ago
No, T1 and T2 name two generic types to be used in the body, the question is, where do you specify what contract they fulfill?
Eg if we convert an example from the doc to your suggestion:
becomes but how are where do you suggest we specify that From and To implement the viaStrings contract?It doesn’t make sense (under this proposal) to replace them with a contract name directly, because the contract in this case takes two type arguments with different expectations of each. You’d need to change the whole proposal such that each contract constrained only a single type, and each function argument could specify potentially a different contract, rather than the current proposal, in which you can only specify one contract that constrains all of the types involved.