Prev | Current Page 350 | Next

Jon Skeet

"C# in Depth: What you need to master C# 2 and 3"


182 CHAPTER 6 Implementing iterators the easy way
before??”in computer science the term coroutine is applied to concepts of this nature.
Different languages have historically supported them to a greater or lesser extent,
with tricks being applicable to simulate them sometimes??”for example, Simon
Tatham has an excellent article12 on how even C can express coroutines if you??™re willing
to bend coding standards somewhat. We??™ve seen that C# 2 makes coroutines easy
to write and use.
Having seen some major and sometimes mind-warping language changes focused
around a few key features, our next chapter is a change of pace. It describes a number
of small changes that make C# 2 more pleasant to work with than its predecessor,
learning from the little niggles of the past to produce a language that has fewer rough
edges, more scope for dealing with awkward backward-compatibility cases, and a better
story around working with generated code. Each feature is relatively straightforward,
but there are quite a few of them??¦
12 http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
183
Concluding C# 2:
the final features
So far we??™ve looked at the four biggest new features of C# 2: generics, nullable types,
delegate enhancements, and iterator blocks. Each of these addresses a fairly complex
requirement, which is why we??™ve gone into each of them in some depth.


Pages:
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362