Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
grandalf
on March 7, 2015
|
parent
|
context
|
favorite
| on:
My Weird Ruby
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
on March 7, 2015
[–]
Yeah the contract here is a form of nominative type checking, it could just as well be structural.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: