13.07.2015 Views

C# in Depth

C# in Depth

C# in Depth

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

182 CHAPTER 6 Implement<strong>in</strong>g iterators the easy waybefore—<strong>in</strong> computer science the term corout<strong>in</strong>e is applied to concepts of this nature.Different languages have historically supported them to a greater or lesser extent,with tricks be<strong>in</strong>g applicable to simulate them sometimes—for example, SimonTatham has an excellent article 12 on how even C can express corout<strong>in</strong>es if you’re will<strong>in</strong>gto bend cod<strong>in</strong>g standards somewhat. We’ve seen that <strong>C#</strong> 2 makes corout<strong>in</strong>es easyto write and use.Hav<strong>in</strong>g seen some major and sometimes m<strong>in</strong>d-warp<strong>in</strong>g language changes focusedaround a few key features, our next chapter is a change of pace. It describes a numberof small changes that make <strong>C#</strong> 2 more pleasant to work with than its predecessor,learn<strong>in</strong>g from the little niggles of the past to produce a language that has fewer roughedges, more scope for deal<strong>in</strong>g with awkward backward-compatibility cases, and a betterstory around work<strong>in</strong>g with generated code. Each feature is relatively straightforward,but there are quite a few of them…12 http://www.chiark.greenend.org.uk/~sgtatham/corout<strong>in</strong>es.htmlLicensed to Rhona Hadida

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!