Simply put, what happens when I have a delegate, that delegate contains a method with a tail call request, and then I call it from a non-tail position?

If I called the method directly, it would discard the existing params and reuse stack space. Does it do the same thing to the Delegate::Invoke's stack that triggers it? Does the method get its own stack entry just like a normal call? Does it fubar the method that called the delegate?

  • The question seems to be about the semantics of the .NET CLR or about C# language semantics, which seems more suited for Stack Overflow. I've voted to migrate. If you are more interested in tail calls as a concept, please edit your question to make that clear. I presume you are trying to implement cool stuff for Tangent? – amon Sep 10 '16 at 16:34
  • @amon - that's where the question originated, but isn't language specific. I just didn't know how these two things interact. – Telastyn Sep 10 '16 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.