continue in catch block? seperate interaction with widgets and work flow
Bill Baxter
dnewsgroup at billbaxter.com
Thu Oct 19 01:27:09 PDT 2006
davidl wrote:
>
> here we consider a work flow in form 1
>
> //code block 1
> ...
> //feed back to form 1's widgets
> ...
> //code block 2
> ...
> //feed back to form 1's widgets
> ...
> [snip]
I don't really understand the problem you're trying to describe, but
this sentence:
> what we need is after handling the exception we need to back to the
> exact point where the exception is raised.
sounds kind of similar to generators & coroutines for which the keyword
"yield" is often used. "Green threads" is another related term. You
yield back to some controlling process but your functions state is
preserved and you can get back there later. Also I think I've seen it
described somewhere as generalizing the function call stack into a
"function call tree".
Some people seem to be crazy about that stuff lately, but I haven't yet
really been able to grok what is so great about it. It's supposed to
simplify things, but all the I've seen just look harder to understand
than the "regular way" to me. Well the generators used to implement
iterators in Python make sense to me.
Supposedly it's very good for games somehow, though:
http://www.eve-online.com/faq/faq_07.asp (look for "stackless")
http://harkal.sylphis3d.com/2005/08/10/multithreaded-game-scripting-with-stackless-python/
--bb
More information about the Digitalmars-d
mailing list