News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by mgdlbp on Wednesday August 04, 2021 @11:17AM (#28061996)
Interestingly, this sort of structural typing was already present in C# 1.0 with the foreach statement allowing anything with a GetEnumerator() method that returns something that looks like an IEnumerator.

This was discussed in 2011 in a StackOverflow question [0], including a link to a blog post by one of the language designers [1].

[0] https://stackoverflow.com/questions/6368967/duck-typing-in-t...

[1] https://web.archive.org/web/20120126033827/http://blogs.msdn...

There are no comments on this comment yet.