3 ms·
That while this looks like a good extension to CoffeeScript, it's unfortunate that Haskell's type syntax was appropriated when the relationship between contract
by jvoorhis 15y ago
That while this looks like a good extension to CoffeeScript, it's unfortunate that Haskell's type syntax was appropriated when the relationship between contracts and types is tenuous at best.
There are good uses for static type checkers and design by contract, but neither one is a good substitute for the other.
- gfodor 15y agoSo you're upset about the syntax? Seems like an odd complaint.
- disnet 15y agoI'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