<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx</link><description>The problem with enumeration is that somebody always loses.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343698</link><pubDate>Wed, 29 Dec 2004 16:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343698</guid><dc:creator>Drazen Dotlic</dc:creator><description>&amp;gt;&amp;gt; (Yes, I could have simplified this code a little by using a built-in stack class, but as I have already noted in the context of smart pointers, I try to present these articles in &amp;quot;pure&amp;quot; C++ so people won't get into arguments about which class library is best.)&lt;br&gt;&lt;br&gt;stack is a part of C++ Standard Library, it's not any particular vendor's one, thus it is &amp;quot;safe&amp;quot; to use in this context.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343768</link><pubDate>Wed, 29 Dec 2004 17:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343768</guid><dc:creator>Raymond Chen</dc:creator><description>It may be the part of the standard library, but it's still a library. Some people may like std::string, others might prefer CString, still others may prefer their own string library. (If everybody agreed on std::string then why are there so many string libraries?)</description></item><item><title>Standard Library</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343797</link><pubDate>Wed, 29 Dec 2004 18:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343797</guid><dc:creator>John McCormick</dc:creator><description>Perhaps if more people treated the standard library as a standard, more people would accept it as such. In any case, I don't think too many people would lampoon you for using it.&lt;br&gt;&lt;br&gt;I always find this sort of mix of c-like code and c++ code a bit jarring, but then I'm not really a windows programmer. Looking forward to tomorrow's installment!</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343799</link><pubDate>Wed, 29 Dec 2004 18:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343799</guid><dc:creator>Raymond Chen</dc:creator><description>True, but if I chose a specific library (even the standard one), I would lose people who weren't familiar with (or actively disliked) that library. But everybody who programs Windows knows what TCHAR is.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343975</link><pubDate>Wed, 29 Dec 2004 22:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343975</guid><dc:creator>Drazen Dotlic</dc:creator><description>&amp;gt;&amp;gt;If everybody agreed on std::string then why are there so many string libraries?&lt;br&gt;&lt;br&gt;So many? Besides MFC, I am not familiar with any other in widespread use.&lt;br&gt;The only reason for these &amp;quot;other&amp;quot; libraries, including (parts of) MFC has been poor implementation (or buggy) of both C++ compiler and/or Standard Library. Things are a lot better now with VS.NET 2003 and will be even better with 2005. It's time to start treating Standard Library as a part of C++ language, not something we might not use because we don't like it or are not familiar with.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343979</link><pubDate>Wed, 29 Dec 2004 22:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343979</guid><dc:creator>Eric TF Bat</dc:creator><description>Maybe it's because I've been reading a lot of LISP code lately, but I looked at this article and my first thought was &amp;quot;Why is Raymond posting randomly-indented assembler code on his blog?&amp;quot;&lt;br&gt;&lt;br&gt;C++: Just Say AAAARRGHH OH GOD STOP AAAAARRRGGGHHH HELP PLEASE PLEASE PLEASE UUURKKK!&lt;br&gt;</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343981</link><pubDate>Wed, 29 Dec 2004 23:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343981</guid><dc:creator>Noob</dc:creator><description>What does fibers have to do with this?</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343982</link><pubDate>Wed, 29 Dec 2004 23:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343982</guid><dc:creator>Larry Osterman</dc:creator><description>Drazen,&lt;br&gt;  There are lots of reasons not to use std::string, and CString/CAtlString often provide an alternative to it.&lt;br&gt;&lt;br&gt;  Just because STL's a part of the C++ standard library doesn't mean that it is a worthy solution for everyone - the code size bloat you get from using STL is enough to preclude its use in many scenarios (like most of the Windows core).  Also the fact that STL's localization support is mediochre (it has to be because it's platform neutral, and localization basically requires a platform specific infrastructure (how you specify your localizable resources depends on the platform)) precludes its use in many places.&lt;br&gt;</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#343984</link><pubDate>Wed, 29 Dec 2004 23:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:343984</guid><dc:creator>Rick C</dc:creator><description>Noob, this is a multi-part lecture.  I'm sure Rand will get to that.  Part 1 is setting a stage.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344002</link><pubDate>Thu, 30 Dec 2004 00:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344002</guid><dc:creator>MYG</dc:creator><description>Noob,&lt;br&gt;&lt;br&gt;Because state is easily held on the CPU stack. A fiber is a bit like a thread in that it has its own stack but the context switching is driven by the application rather than the scheduler. &lt;br&gt;&lt;br&gt;So the idea here is to have a tasking module without the tasking overhead (or part of it, stack space is overhead): two &amp;quot;fibers&amp;quot;, one a consumer, one a producer. &lt;br&gt;&lt;br&gt;Think of fibers as setjmp()/longjmp() with separate stacks. &lt;br&gt;&lt;br&gt;IIRC, there is a &amp;quot;fiber like&amp;quot; construct in later versions of VMS. I wonder if they are a Cutler decree or just a common good idea.&lt;br&gt;</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344005</link><pubDate>Thu, 30 Dec 2004 00:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344005</guid><dc:creator>Michael Kaplan</dc:creator><description>Speaking as the owner of a technology (namely, linguistic collation) and a colleague to the owner of a technology (namely encoding / codepages) and a former owner of a technology (namely, locale based formatting) which is superior in almost every way to the correponding CRT analogue, I can tell you that there are indeed times that the CRT is not always the best solution. And there do exist many times that it is not the answer....</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344012</link><pubDate>Thu, 30 Dec 2004 00:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344012</guid><dc:creator>Kent Boogaart</dc:creator><description>This is OT and for that I apologise . . .&lt;br&gt;&lt;br&gt;Does anyone know where I can find information about the next standard version of C++? I remember hearing about this somewhere but have no idea what it is codenamed etcetera.&lt;br&gt;&lt;br&gt;Nice article Raymond (as per usual).</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344112</link><pubDate>Thu, 30 Dec 2004 06:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344112</guid><dc:creator>Tim Smith</dc:creator><description>std::auto_ptr is a perfect example of something that just because it is the standard doesn't mean it is good.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344182</link><pubDate>Thu, 30 Dec 2004 09:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344182</guid><dc:creator>Andreas Häber</dc:creator><description>Kent: &lt;br&gt;You can find some links about the next C++ standard here: &lt;a target="_new" href="http://www.gotw.ca/iso/"&gt;http://www.gotw.ca/iso/&lt;/a&gt;&lt;br&gt;&lt;br&gt;And also check out Herb Sutter's blog at &lt;a target="_new" href="http://www.pluralsight.com/blogs/hsutter/default.aspx"&gt;http://www.pluralsight.com/blogs/hsutter/default.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;Happy new year everyone :)</description></item><item><title>Using fibers to simplify enumerators, part 2: When life is easier for the caller</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344282</link><pubDate>Thu, 30 Dec 2004 17:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344282</guid><dc:creator>The Old New Thing</dc:creator><description>This time, we'll watch the enumerator lose.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344371</link><pubDate>Thu, 30 Dec 2004 17:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344371</guid><dc:creator>Drazen Dotlic</dc:creator><description>&amp;gt;&amp;gt;Drazen, &lt;br&gt;&amp;gt;&amp;gt;There are lots of reasons not to use std::string, and CString/CAtlString often provide an alternative to it.&lt;br&gt;&lt;br&gt;Larry,&lt;br&gt;&lt;br&gt;you are right. But let's put things into context here - this is supposed to be an example of a certain technique. State management is only a necessary &amp;quot;evil&amp;quot; here, it is not a meat of the post. I am simply arguing that standard stack could have been used to simplify the code sample without jeopardizing the message of the post - even better, shorter code might have improved the readibility and help push the message through.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344382</link><pubDate>Thu, 30 Dec 2004 17:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344382</guid><dc:creator>Raymond Chen</dc:creator><description>Perhaps true, but when I see std:: stuff I tend to get more confused rather than less.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344407</link><pubDate>Thu, 30 Dec 2004 18:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344407</guid><dc:creator>Michael Grier [MSFT]</dc:creator><description>The std:: stuff assumes you are comfortable with exceptions.  I personally believe that there are unsolvable quality problems associated with use of exceptions.  Thus, even though the library seems very useful, I stay as far away from the STL libraries as possible.&lt;br&gt;&lt;br&gt;C and C++ (pre-STL) were systems programming languages which provided you with a syntax for using the underlying machine.  The libraries provided were really just tokens to portability.&lt;br&gt;&lt;br&gt;With the introduction of STL, C++ is moving/has moved out of the systems programming space and is trying to seem like an application programming language like BASIC.  I personally don't see the point.  If I wanted to use BASIC, with all its plusses and minuses, I'd use BASIC.&lt;br&gt;</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#344429</link><pubDate>Thu, 30 Dec 2004 18:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:344429</guid><dc:creator>asdf</dc:creator><description>&amp;quot;an application programming language like BASIC&amp;quot;&lt;br&gt;&lt;br&gt;I see Microsoft doesn't do any drug testing...&lt;br&gt;&lt;br&gt;Raymond: You need to cast the ULONGLONGs to unsigned __int64 when you pass it in to printf and you need the format to be %I64u because %I64d is the signed version.</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#345863</link><pubDate>Mon, 03 Jan 2005 18:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:345863</guid><dc:creator>Cooney</dc:creator><description>&amp;gt; I see Microsoft doesn't do any drug testing...&lt;br&gt;&lt;br&gt;Perhaps they do, just not the way you were thinking ;)</description></item><item><title>re: Using fibers to simplify enumerators, part 1: When life is easier for the enumerator</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#346407</link><pubDate>Tue, 04 Jan 2005 18:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:346407</guid><dc:creator>Sig9</dc:creator><description>is part of the software industry.  if you do not learn to learn (ya ya ya) you will be out of a job as fast as you can say &amp;quot;hello world!&amp;quot;</description></item><item><title>Why does Win32 even have Fibers?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#347315</link><pubDate>Thu, 06 Jan 2005 02:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:347315</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description /></item><item><title>Why does Win32 even have Fibers?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#350090</link><pubDate>Mon, 10 Jan 2005 22:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:350090</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description /></item><item><title>CSci 101 Part I</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#355775</link><pubDate>Wed, 19 Jan 2005 08:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:355775</guid><dc:creator>public Blog</dc:creator><description>CSci 101 Part I</description></item><item><title>Partially Debuggable CoRoutines</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#357616</link><pubDate>Fri, 21 Jan 2005 02:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:357616</guid><dc:creator>Wizzy's World</dc:creator><description>A while back there was an article in MSDN magazine about wrapping up the unmaged fibers API to implement...</description></item><item><title>Coroutines</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#1453678</link><pubDate>Fri, 12 Jan 2007 06:19:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1453678</guid><dc:creator>Joe White's Blog</dc:creator><description /></item><item><title>Coroutines</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#1453683</link><pubDate>Fri, 12 Jan 2007 06:21:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1453683</guid><dc:creator>Joe White's Blog</dc:creator><description /></item><item><title>Labr??tens Web Log  &amp;raquo; Blog Archive   &amp;raquo; Mimic the C# yield instruction in VC++</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/12/29/343664.aspx#6587864</link><pubDate>Thu, 29 Nov 2007 03:25:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6587864</guid><dc:creator>Labr??tens Web Log  » Blog Archive   » Mimic the C# yield instruction in VC++</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.labraaten.com/wpblog/2007/11/29/mimic-the-c-yield-instruction-in-vc/"&gt;http://www.labraaten.com/wpblog/2007/11/29/mimic-the-c-yield-instruction-in-vc/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>