不是小虫虫,海量的recursive会导致系统崩溃。
理由问鸭子。
对不起歪楼了。
我那情况不会有海量的 recursive. 原state machine 只所以复杂是因为使用 function的caller 情况很复杂。 那state machine tried to include all cases, but callers keep asking for more scenarios, that is why it is problematic. In fact the callers may have different requests after the functionality has been shipped. My solution defers the logic to the callers: callers use existing macros to say what they want in what condition. so if there are any bugs, it is more likely the caller did not state the condition well or caller did not state what it wants correctly. Simple MVC design pattern.