Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

"Tail recursion"

Name: Anonymous 2011-04-03 0:15

What do you picture when you hear this?

Name: Anonymous 2011-04-03 0:19

girrrrrrrrrrrrrrl u don een wanna no

Name: Anonymous 2011-04-03 0:20

pop pop push push jmp

Name: Anonymous 2011-04-03 0:20

I don't picture a tail, if that's what you mean. You aren't a proper computer scientist or software developer if you do. You are deviant furfag scum of society who must be purged if you envision a tail.

One must imagine a recursive stack where the state of the stack at all previous recursive steps is no longer needed so it can be collapsed in on the current step.

Name: Anonymous 2011-04-03 0:24

>>3-4
A Sussmind With /prog/ in this state‽‽

Name: Anonymous 2011-04-03 0:33

>>5
I'm starving for decent threads. Feed me.

Name: Anonymous 2011-04-03 0:35

I'm with >>3.

Name: Anonymous 2011-04-03 0:36

>>4
>I don't picture a tail, if that's what you mean.

But if Python is a snake and snakes have tails then why doesn't Python have tail recursion

Name: Anonymous 2011-04-03 0:36

A goto/jump, if TCO is supported. Optional stack-frame unwinding may come before it, but not depends on the code and the compiler.

Name: Anonymous 2011-04-03 0:37

>>8
It's called tail recursion elimination for a reason.

Name: Anonymous 2011-04-03 0:42

>>10
talk about optimization! python could use some more of that

Name: Anonymous 2011-04-03 0:44

Name: Anonymous 2011-04-03 0:56

Instead of opening another thread, I'll just ask here:
If a C procedure uses cdecl, and tail calls to a procedure with a not compatible signature (e.g. (int, int) and (float, char*, int)), tail call optimization would be impossible to do, right?

Name: Anonymous 2011-04-03 0:57

>>12
That's a butthurt faggot unaware of the fact that Python is just a glorified scripting language. It's made to coordinate C/C++ libraries made by autistic faggots, such as you, dear reader.

Name: Anonymous 2011-04-03 0:58

>>13
If you knew how asm works, you'd know the answer is that tail call optimization works whenever you have a tail call. That's why it's called tail call optimization. Hurr fucking durr.

>>16
Fuck off, faggot.

Name: IHBT 2011-04-03 1:02

>>15
The parameters are stored before the caller's return address, and it's the caller that does the clean up.

So, back to /g/.

Name: Anonymous 2011-04-03 1:13

>>16
If you knew the answer, why'd you ask? Suck a cock.

Also, it works if the size of the arguments for the 2nd callee is smaller than for the 1st one.

Name: Anonymous 2011-04-03 1:17

>>17
If you knew the answer, why'd you ask? Suck a cock.
Just to be sure.

Name: Anonymous 2011-04-03 4:25

a form that looks like this

(xxxxxxxx
    (xx (X x x)
         x
         (xxxxxxxxxxx)))

Name: Anonymous 2011-04-03 9:55

Do you know Tails from Sonic the Hedgehog?

That's what I imagine every time I hear the word "tail". ._.

Don't change these.
Name: Email:
Entire Thread Thread List