It's one of the places the compiler uses duck-typing...no interface needed. Would be great to have this type of shape-based coding pattern more available to the developer, sometimes called "structural typing." The father of C#, Anders Hejlsberg, said that the benefits of structural typing was a big take-away for him when he subsequently designed Typescript.
David Cuccia
Let's learn new things and use them
It's one of the places the compiler uses duck-typing...no interface needed. Would be great to have this type of shape-based coding pattern more available to the developer, sometimes called "structural typing." The father of C#, Anders Hejlsberg, said that the benefits of structural typing was a big take-away for him when he subsequently designed Typescript.