This is somewhat related to Does functional programming replace GoF design patterns?
Since the introduction of lambdas and dynamics in C#, are there any of the standard design patterns that could be considered obsolete or solved in some other way using lambdas or other language features?
For example, the dynamic features of C# can now be used to do multi methods. http://achoiusa.wordpress.com/2009/08/27/exploring-c-4-0-multimethods/ (I think Marc Gravell had some post about this to ?)
Personally I tend to do factories using Func of T nowdays.
e.g.
public static class SomeFactory
{
public static Func<IUnitOfWork> GetUoW =
() => new EF4UoW(new SomeModelContainer());
}
// usage
var uow = SomeFactory.GetUoW();
// testabillity
var testUoW = new InMemUoW();
testUoW.Add(new Customer()...);
SomeFactory.GetUoW = () => testUoW;
// the service can get an UoW using the factory
var result = SomeDomainService.DoStuff(...);
Anyone got other examples?
[Edit] Ofcourse the patterns don't go obsolete per se but some patterns are paradigm specific and thus since C# is now multi paradigm, some of the functional properties of C# may make some of the OOP patterns less attractive.