Re: C# iterators and suspend/resume in Simula 67
From: William Stacey [MVP] (staceywREMOVE_at_mvps.org)
Date: 02/20/04
- Next message: bob: "OleDbDataAdapter Update Question"
- Previous message: Peter Bromberg [C# MVP]: "Re: problems with inheritance???"
- In reply to: Jiri Kripac: "C# iterators and suspend/resume in Simula 67"
- Next in thread: Jiri Kripac: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: Jiri Kripac: "Re: C# iterators and suspend/resume in Simula 67"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 21:38:27 -0500
Not sure I follow that. C# has a yield statement?
I think if you want to schedule your own methods, you might look into
Fibers.
-- William Stacey, MVP "Jiri Kripac" <jiri.kripac@autodesk.com> wrote in message news:uxm72i19DHA.3820@tk2msftngp13.phx.gbl... > Languages such as Simula 67 contain a general concept of coroutines that > allow the execution of a method to be suspended without rolling back the > stack and then later resumed at the same place as it has been suspended. > > The C# iterators seem to be a special case of this general suspend/resume > concept. The "yield" statement suspends the execution of the current method > and calling MoveNext() resumes it. > > I think it would be cleaner to introduce the general suspend/resume concept > to C# and then implement C# iterators on top of this general foundation. The > way C# iterators have been added to C# seems to be somewhat ad hoc; it is a > very specific and distinct functionality that does not naturally blend with > the rest of the language. > > Jiri > >
- Next message: bob: "OleDbDataAdapter Update Question"
- Previous message: Peter Bromberg [C# MVP]: "Re: problems with inheritance???"
- In reply to: Jiri Kripac: "C# iterators and suspend/resume in Simula 67"
- Next in thread: Jiri Kripac: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: Jiri Kripac: "Re: C# iterators and suspend/resume in Simula 67"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|