GrantRi's WebLog [MS]
Ramblings of a compiler geek
Translate This Page
Translate this page
Error Messages and Warnings
House and Home
Browse by Tags
GrantRi's WebLog [MS]
Tagged Content List
OK, a few days ago I asked about how you used anonymous methods . Thanks for the very few who responded. I'm hoping that more people have used them than chose to respond. Now it's time to ask about my other pet feature: Iterators. How an possibly more importantly why do you use iterators? I'm sure that...
17 Aug 2004
More thoughts on Iterators
So I had a short email exchange with a collegue about iterators. He mentioned that I should put in in my blog. Seemed reasonable, so here it is: Subject: Iterator generated code ... I'm looking at porting a hand-coded enumerator to use iterators (this is for a sample and maybe an...
7 May 2004
First off, I don't even pretend to have a good comprehension of how remoting works. What I do know is that right now the compiler generated classes derive directly from Object, and somehow this is bad for remoting, instead they should derive from MarshalByReferenceObject. On the surface that is a...
17 Apr 2004
Recursive Iterators made Iterative
So I've been thinking about this, and although it seems like CS101 to transform a recursive algorithm into an iterative one, and example might be worth while. The natural one to attack would be the generic binary tree traversal iterator. So here goes! My first thought would be to use the new Queue...
8 Apr 2004
A good author writes better than a good developer
So here's a recent MSDN article that I actually had the chance of reviewing several months ago. They've done a much better job at capturing the good new stuff in C# than I could ever do. http://msdn.microsoft.com/vcsharp/default.aspx?pull=/msdnmag/issues/04/05/c20/default.aspx I do still have a...
30 Mar 2004
Some Cool New Features
I've been looking over some of my last few posts and they could easily come across as if I thought iterators and anonymous methods were the worst language features every added, and will never serve a good purpose. If anything I think the opposite (or else I wouldn't have spent so much time on them)....
26 Mar 2004
Recursive Iterators (aka Perf killers)
Technically this isn't specific to iterators, but its so much easier to do with iterators that I thought I'd mention it. Some languages are smart enough to 'flatten' iterators, such that if an iterator is called insde of another iterator, only one iteration object exists. C# is not one of those languages...
24 Mar 2004
Anonymous method (and Iterator) perf
probably a few of you hav asked how to make iterators and anonymous methods fast. Well hopefully if you understand how the compiler translates them, it should be relatively easy to optimize them. The first thing to remember is that for all practical purposes the C# compiler does not have an optimizer...
19 Mar 2004
Page 1 of 1 (8 items)
© 2015 Microsoft Corporation.
Privacy & Cookies