3 ms·
Couldn't you still have duck typing? If a method expects to be passed an argument that it can call "quack" on, can't you define a type that has "quack"? The ac
by bboylen 4y ago
Couldn't you still have duck typing?
If a method expects to be passed an argument that it can call "quack" on, can't you define a type that has "quack"? The actual argument could be a Duck or a Goose but as long as it has a "quack" method the type will be OK
I haven't used types in Ruby (or much at all other than dabbling in Typescript), so I might be missing something