Linked by Eugenia Loli on Sun 22nd Apr 2007 07:43 UTC
.NET (dotGNU too) All too often, source code spends a lot of time on basic housekeeping, monitoring the state of many objects. This is wasteful, and with C# it is unnecessary. Software expert Stephen Morris shows how C# provides a range of callback mechanisms that obviate the need for polling objects for state information.
Thread beginning with comment 232917
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: It is a shame
by nberardi on Sun 22nd Apr 2007 15:09 UTC in reply to "It is a shame"
nberardi
Member since:
2005-07-10

I thought this is why we used the delegate event model, or the event subscriber model, so that we didn't have to monitor all this stuff?

Reply Parent Score: 1

RE[2]: It is a shame
by jayson.knight on Sun 22nd Apr 2007 18:43 in reply to "RE: It is a shame"
jayson.knight Member since:
2005-07-06

"I thought this is why we used the delegate event model, or the event subscriber model, so that we didn't have to monitor all this stuff?"

You are absolutely 100% correct. I have no idea why the author went through all the pains of setting up all the callbacks/polling/whatever you want to call it, by hand in this example when delegates (Name EventHandler delegates) would have more than sufficed, as well as made the code much more readable, and smaller.

It's almost like he went out of his way to do it the Java way ;-).

Reply Parent Score: 3

RE[3]: It is a shame
by nberardi on Sun 22nd Apr 2007 22:37 in reply to "RE[2]: It is a shame"
nberardi Member since:
2005-07-10

Yeah I am just going to assume that this author closely relates to this article. http://worsethanfailure.com/Articles/The_Complicator_0x27_s_Bicycle...

Reply Parent Score: 2