in reply to Re^2: Tail recursion elimination
in thread Tail recursion elimination

jdporter,
Right - when you re-use the stack frame it is an optimization referred to as elimination. When you don't re-use the stack frame but create a new one, is it still called elimination? Perhaps that is too pedantic.

Cheers - L~R

Replies are listed 'Best First'.
Re^4: Tail recursion elimination
by billh (Pilgrim) on May 02, 2006 at 11:11 UTC
    jdporter
    Isn't that the same thing? in a stack discipline re-using a stack frame just means popping a frame and then pushing one.
    Bill H
    perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'
Re^4: Tail recursion elimination
by Anonymous Monk on May 01, 2006 at 18:26 UTC
    Um, goto &SUB does create a new stack frame, but only after the old one is stripped off. (Shouldn't leak memory though.)
      Anonymous Monk,
      Ok - you have copied/pasted from the same node I have linked to twice now. What exactly is it that you think I am missing?

      Cheers - L~R