5 ms·
I'm not sure that the relationship between types and contracts is all that tenuous. They both work to enforce program invariants and there's a large overlap in
by disnet 15y ago
I'm not sure that the relationship between types and contracts is all that tenuous.
They both work to enforce program invariants and there's a large overlap in the invariants they can express. Usually contracts are checked dynamically (as in contracts.coffee) but this is not a hard requirement (for example .net's code contracts can be statically checked [1]).
http://msdn.microsoft.com/en-us/devlabs/dd491992 http://msdn.microsoft.com/en-us/devlabs/dd491992