C# iterators and suspend/resume in Simula 67
From: Jiri Kripac (jiri.kripac_at_autodesk.com)
Date: 02/20/04
- Next message: Peter Bromberg [C# MVP]: "Re: problems with inheritance???"
- Previous message: William Stacey [MVP]: "Re: Asynchronous Programming"
- Next in thread: William Stacey [MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: William Stacey [MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: Daniel O'Connell [C# MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: v-jetan_at_online.microsoft.com: "RE: C# iterators and suspend/resume in Simula 67"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 18:24:47 -0800
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: Peter Bromberg [C# MVP]: "Re: problems with inheritance???"
- Previous message: William Stacey [MVP]: "Re: Asynchronous Programming"
- Next in thread: William Stacey [MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: William Stacey [MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: Daniel O'Connell [C# MVP]: "Re: C# iterators and suspend/resume in Simula 67"
- Reply: v-jetan_at_online.microsoft.com: "RE: C# iterators and suspend/resume in Simula 67"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|