any chance we will get tail calls in C# 4.0?

B

Ben Voigt [C++ MVP]

Peter said:
I doubt you'd see that. Tail recursion is so trivially implemented
as a plain iterative loop, I can't imagine that such a feature would
meet the bar for inclusion in the language.

I think more generally, switch/goto case (there's no requirement that the
tail call has to be recursion back to the same function, all participating
functions would have to be combined and turned into different case blocks in
a single master function).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top