Steve Sanbeg wrote:
I'd assume we want locked down. Loops would be hard in any locked-down environment; I don't recall seeing any recommendation in this thread on how that wold be done. Recursion is much simpler, just track the depth, and throw an exception if it goes to deep; emacs lisp already uses this mechanism.
Loops are essential for readable code. There is no problem with allowing loops in conjunction with time limits, that we don't have already with complex templates. In fact, time limits for complex templates would be an improvement over the system of expansion limits we have at the moment.
Recursion can give a long running time even if the depth is limited. By calling the function multiple times from its own body, you can have exponential time order in the recursion depth.
-- Tim Starling