Feature Request List /
Coroutines
I put this together in a hurry, so you'll probably need to follow some of the links to understand the context. -- JustinCalvarese
|
Introduction
Newsgroup Discussion
Initial suggestion
Has coroutine (sather style iterator) been discussed before on this list? Will D has something similar?
C# has it. Sather has it. Python has it.
Some discussion on comp.lang.eiffel:
Adapted from NG:D/15297
Walter's posts
From NG:D/15345:
- Coroutines are pretty cool. They aren't in D now, but they could be added in the future.
- I'd like to eventually add coroutines to D, but there are other things that need to be done first. If you'd like to do a coroutine class, sort of like some of the C++ ones out there, that could become part of Phobos. It could hide the portability issues.
- I'm going to have to study it a bit. Can you make it work on linux? Write a doc file for it?
- I've been reading about fibers on google, but I am not yet convinced they are the right solutions for coroutines because:
- 1) seems like a lot of overhead to manage them
- 2) not portable
- It sounds like fibers have an ill-designed implementation, and are not ready for prime time. Besides, I may have found a neato way to do iterators without need of coroutines.
- I want to try and implement it first to see if it works. I have my best ideas when out jogging, including this one. What I like to do is 'load up on context', which means do all my research at the computer, with this newsgroup, google, my books, etc. Then out the door for a run. I think all the pounding seems to throw all the bits of data around in the air, shaking them around until they fit together <g>.
Other Threads
- 2004/04/15, Simon Hobbs, NG:D/27549
- 2002/12/29, Andy Friesen, NG:D/9752