سؤال

Does Rascal do tail-call optimization? In particular, if I write code using tail recursion instead of those built-in loop construct, do I expect efficiency penalty?

هل كانت مفيدة؟

المحلول

Yes, you should expect efficiency penalty with the current implementation.

We do expect the compiler (which is being written now) to do tail-call optimization in the future.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top