Comment

Comment by bboylen

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

parent bboylen 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton