Re: Anonymous Methods

Tech-Archive recommends: Fix windows errors by optimizing your registry



John Smith wrote:
> My main concern about Anon methods is that as you have agreed it can
> create a mess when used to encapsulate many lines of code and the other
> main worry is reusability. If you have several developers at different
> intellectual levels working on a big project and they start using anon
> methods ( from my experience found that they would if they could!) the
> code is not only un-maintainable but severely bloated (results from
> copying and pasting).

That indicates a failure of communication and convention though.

There are many things which can be abused - just define a convention
which states what's acceptable and unacceptable, and enforce it. This
is of course easier to do if you're already using code reviews or pair
programming.

In my view the benefits (in terms of readability, mostly) of anonymous
methods outweigh the potential problems.

Jon

.



Relevant Pages

  • Re: Anonymous Methods
    ... > My main concern about Anon methods is that as you have agreed it can ... > create a mess when used to encapsulate many lines of code and the other ... Surely it is better to higher good programmers than to try to make bad ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Anonymous Methods
    ... My main concern about Anon methods is that as you have agreed it can ... create a mess when used to encapsulate many lines of code and the other ... insulate developers from designer generated code and it can be abused ...
    (microsoft.public.dotnet.languages.csharp)