Recursive typedef

BCS nothing at pathlink.com
Thu Oct 5 16:52:06 PDT 2006


== Quote from Markus Dangl (danglm at in.tum.de)'s article
> 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!

Oh yah is it flexable.

Add a few more types of nesting {}, (), [] <>, <%%> or maby have it behave
differently inside of "{(<" than inside of "{<[". But that is just getting silly.





More information about the Digitalmars-d-learn mailing list