3 ms·
Well, the same kind of contracts approach could be used to enforce a duck-typed set of behaviors: [:quacks], [:barks] => Maybe[:flies] Some Rubyists get ped
by grandalf 12y ago
Well, the same kind of contracts approach could be used to enforce a duck-typed set of behaviors:
[:quacks], [:barks] => Maybe[:flies]
Some Rubyists get pedantic about duck typing. It's just a tool to design good systems, not an article of faith.
- masklinn 12y agoYeah the contract here is a form of nominative type checking, it could just as well be structural.