Why wasn't yield added to C++0x?

后端 未结 8 1663
谎友^
谎友^ 2020-12-13 18:51

I have been using yield in many of my Python programs, and it really clears up the code in many cases. I blogged about it and it is one of my site\'s popular pages.

8条回答
  •  天命终不由人
    2020-12-13 19:35

    In general, you can track what's going on by the committee papers, although it's better for keeping track rather than looking up a specific issue.

    One thing to remember about the C++ committee is that it is a volunteer committee, and can't accomplish everything it wants to. For example, there was no hash-type map in the original standard, because they couldn't manage to make it in time. It could be that there was nobody on the committee who cared enough about yield and what it does to make sure the work got done.

    The best way to find out would be to ask an active committee member.

提交回复
热议问题