> > Python has a cool feature called generators (stolen from other > languages) which basically turns a function into an input iterator. > When the function yields a value instead of returning, that represents > the value at one position of the iterator. When the function finally > returns, the iterator is exhausted. This can be a very simple way to > code up a state machine. See: > http://mail.python.org/pipermail/python-dev/1999-July/000467.html.
additonally, the possible use in that case of lambda functions as "co-routines" you see in simulation languages/packages, would make implementing a discrete event system (e.g. simulation) a "breeze" (read: a lot easier). See, for example, SimPy. renej _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost