News for hackers. Stuff that matters.
Re:Ask HN: Why choose a dynamically typed language? by DougBTX on Saturday August 07, 2010 @03:57PM (#1584187)
> in this circumstance C# lets you write many methods, use generics, or (now I believe) use dynamically typed variables.

Or you could be explicit about the interface you are writing the duck-typed code against. The problem here is that you can't assign an interface to an existing type, and adding interface declarations results in more code. It will be interesting to see whether this functionality (extension interfaces and inferred interfaces) makes it into C# in the next 5 years. My guess is that it's functionality which is possible to add, but we're not there yet.

There are no comments on this comment yet.