Search code examples
c#javaperlanonymous-methodsanonymous-function

Anonymous methods/functions: a fundamental feature or a violation of OO principles?


Is the recent movement towards anonymous methods/functions by mainstream languages like perl and C# something important, or a weird feature that violates OO principles?

Are recent libraries like the most recent version of Intel's Thread Building Blocks and Microsofts PPL and Linq that depend on such things a good thing, or not?

Are languages that currently reject anonymous methods/functions, like Java, making wise choices in sticking with a purely OO model, or are they falling behind by lacking a fundamental programming feature?


Solution

  • The expressive power of lambda expressions combined with fluent APIs like LINQ far outweigh any perceived violation of pure OO principles.