3 ms·
Contract is just the feature is defines the abilities of the genericized types. A contract in Go enables generic programming or as other state it "generics".
by nemith 7y ago
Contract is just the feature is defines the abilities of the genericized types.
A contract in Go enables generic programming or as other state it "generics".
In C++20 there is concepts which is very similar. https://en.wikipedia.org/wiki/Concepts_(C%2B%2B) https://en.wikipedia.org/wiki/Concepts_(C%2B%2B) in constraining the generic type before template expansion.
- pjmlp 7y agoContracts in programming language have a very precise meaning. https://en.wikipedia.org/wiki/Design_by_contract https://en.wikipedia.org/wiki/Design_by_contract