D - Co-routines
- Simon Hobbs (4/4) Apr 15 2004 Has any thought been given to adding co-routines to D? They're another t...
- qw (6/10) Apr 15 2004 I remember reading something about it some time ago in this forum... I'd...
- Golan (4/16) Apr 15 2004 Compiled languages like Modula-2, Ada and Eiffel support coroutines and ...
- J C Calvarese (37/42) Apr 15 2004 It's been discussed before (Aug 2003). Walter expressed interest.
- Simon Hobbs (2/2) Apr 16 2004 Thanks very much
Has any thought been given to adding co-routines to D? They're another thing I've seen fudged in C/C++ so many times, but that really seem to require native language support. Sorry if this has been discussed before, but I'm new here :)
Apr 15 2004
In article <c5mqbn$frn$1 digitaldaemon.com>, Simon Hobbs says...Has any thought been given to adding co-routines to D? They're another thing I've seen fudged in C/C++ so many times, but that really seem to require native language support. Sorry if this has been discussed before, but I'm new here :)I remember reading something about it some time ago in this forum... I'd like to have coroutines, too. Yesterday i read some papers about Lua's implementation regarding coroutines and they seemed quite useful (more than Python's), given some time to experimente with them. But Lua is interpreted; maybe it's harder to implement coroutines in languages compiled to machine-code...
Apr 15 2004
Compiled languages like Modula-2, Ada and Eiffel support coroutines and they are efficiently implemented in Modula-2 and Ada compilers. Golan In article <c5mva4$n7o$1 digitaldaemon.com>, qw says...In article <c5mqbn$frn$1 digitaldaemon.com>, Simon Hobbs says...Has any thought been given to adding co-routines to D? They're another thing I've seen fudged in C/C++ so many times, but that really seem to require native language support. Sorry if this has been discussed before, but I'm new here :)I remember reading something about it some time ago in this forum... I'd like to have coroutines, too. Yesterday i read some papers about Lua's implementation regarding coroutines and they seemed quite useful (more than Python's), given some time to experimente with them. But Lua is interpreted; maybe it's harder to implement coroutines in languages compiled to machine-code...
Apr 15 2004
Simon Hobbs wrote:Has any thought been given to adding co-routines to D? They're another thing I've seen fudged in C/C++ so many times, but that really seem to require native language support. Sorry if this has been discussed before, but I'm new here :)It's been discussed before (Aug 2003). Walter expressed interest. Here's some references (I put this together in a hurry, so you'll need to follow some of the links to understand the context): *Initial suggestion* http://www.digitalmars.com/drn-bin/wwwnews?D/15297 *Walter's posts* "Coroutines are pretty cool. They aren't in D now, but they could be added in the future." http://www.digitalmars.com/drn-bin/wwwnews?D/15345 "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." http://www.digitalmars.com/drn-bin/wwwnews?D/15361 "I'm going to have to study it a bit. Can you make it work on linux? Write a doc file for it?" http://www.digitalmars.com/drn-bin/wwwnews?D/15374 "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" http://www.digitalmars.com/drn-bin/wwwnews?D/15349 "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." http://www.digitalmars.com/drn-bin/wwwnews?D/15434 "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>." http://www.digitalmars.com/drn-bin/wwwnews?D/15476 -- Justin http://jcc_7.tripod.com/d/
Apr 15 2004