Recursive typedef
Markus Dangl
danglm at in.tum.de
Thu Oct 5 12:16:06 PDT 2006
BCS schrieb:
> One interesting things about the delegate form is that it can be used to
> make an *infinite* state machine.
So, in principle you are using a stack, the current struct "nest" is
your top of the stack, "{" leads to pushing a new element on the top,
"}" pops the top element and returns the execution of the previous state
machine.
In theory, such a machine is infinite, but as you're limited by your
computer's memory anyway you might as well use a "size_t" and count the
parens directly ;)
But the functional style just looks cool and it's very flexible!
More information about the Digitalmars-d-learn
mailing list