I can’t help it…
Posted by Davy Brion on July 25th, 2008
but i think this is cool:
[Test]
public void DisposesRequestProcessorUponDisposal()
{
requestProcessor.Expect(r => r.Dispose());
requestProcessor.Replay();
dispatcher.Dispose();
requestProcessor.VerifyAllExpectations();
}
i know… i know… total geek.
July 25th, 2008 at 6:54 pm
cool man!
what is it?
July 26th, 2008 at 1:46 pm
i would think (hope) that it’s pretty obvious…
July 27th, 2008 at 1:45 am
I think the r => r.Dispose() is the hard part. I do think it’s obvious, although … maybe not pretty obvious
. But yeah, pretty cool.
Type inference in C# (3.whatever) sucks big time b.t.w., ( r being an inferred Request class I guess, I’m still on 2.0 … ) either go all the way, or don’t do it at all, is my opinion. I think ambiguity should be avoided, unless it enriches the language, as for instance the ambiguity of multiple inheritance does. The C# sharp guys haseem to miss this point on multiple occasions. MS’s current infatiation with functional languages that seeps through in their own implementation does not do justice to the origanal ideas. Check out Scheme, Haskell, or Lisp.
July 27th, 2008 at 1:53 am
And check out the Nomad pattern while you’re at it… It blew my mind.