Re: When to use delegates



jon-boy <nospam@xxxxxxxxxxxxxx> writes:
Hi there,

More of a general question, rather than an issue.

Basically, I'm wondering where and when I should be using delegates in
my applications? I obviously use events, so do use them, but I've
never once declared my own delegates in code.

Design patterns are a large component in the dumbing down of
modern software engineering. It's almost as if they were invented
so that the programmer doesn't need to think. You end up with
O(lg(n)) problems being "solved" with O(n^2) implemetations.

That, with n in the thousands, was a nightmare I one saw in a
r-t/e context a few years back. I was reminded of that just this
morning, as I heard that it's a cancer that plagues some bits of
our current (again, r-t/e) project too. Just another reason DBus
sucks, I guess, not that I needed any more evidence of that.

So, am I missing out on something good? I understand them in theory,
but every example I see on the internet is trivial and stupid - I just
can't relate these to real-world business problems that I face and
seemingly manage to solve without them.

Can anyone give a good run down of them and any potential areas in my
designs that I should look to use them?

Never mutilate your approach to a problem to fit a solution to
a different problem that you already have.

Phil
--
If GML was an infant, SGML is the bright youngster far exceeds
expectations and made its parents too proud, but XML is the
drug-addicted gang member who had committed his first murder
before he had sex, which was rape. -- Erik Naggum (1965-2009)
.



Relevant Pages

  • event/delegate question - newbie
    ... I am familiar with using events and delegates in an application. ... working on a new project in work where I have two applications that are ... I am unfamiliar ... point me to an article or some sample code somewhere that might give me ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: When to use delegates
    ... More of a general question, ... my applications? ... never once declared my own delegates in code. ... the particular design framework you're fond of? ...
    (comp.lang.c)
  • When to use delegates
    ... More of a general question, ... my applications? ... never once declared my own delegates in code. ... designs that I should look to use them? ...
    (comp.lang.c)
  • Re: When to use delegates?
    ... want to apply a delegate to this scenario or not. ... The code you shows creates four delegates from ... Your most frequent usage of delegates would be when implementing events in ... your applications. ...
    (microsoft.public.dotnet.languages.csharp)