Duck Typing in C#

22 August 2007 in Programming

I recently found a .NET class library that enables duck typing by David Meyer for .NET languages like C# and VB.NET.

Although I see the benefits of using this style of programming (mostly because VB was one my first programming languages), I still find the strong typing that exists on C# very helpful by providing a extra security layer in its data structures (while we still can use the duck typing approach with generics).

If it walks like a duck and quacks like a duck, it must be a duck.

Unfortunately, I don’t have the time to elaborate on the subject, but I would point you out this Phil Haack post: “How Duck Typing benefits C# developers”. It gives a good explanation on the subject and talks about some of its advantages.

Leave a Comment

Name (required)

E-mail (required - not published)

Website

Your comment:


Search


Pages


Top Posts


Categories


Advertising