|
![](/i/fill.gif) |
>> Nobody writes recursive code? IN WHICH UNIVERSE??
>
> I have written very very little recursive code in my entire career.
Damn... I'm trying to think of something you can code without actually
using recursion. Hmm. Well, I guess there must be /something/...
>> Besides, it's not like there's an /alternative/ to recursion.
>
> Of course there is. I'm pretty sure every recursive algorithm can be
> made explicitly iterative. The advantage of doing so is that you can
> handle failures of running out of resources, before you ask.
So if you want to count how many nodes there are in a binary tree, how
do you do that non-recursively?
>> Amazing. So the one calling convention that every piece of software
>> supports
>> isn't actually defined at all. That's impressive, right there.
>
> Which calling convention do you think every piece of software supports?
> Not sure if you're trying to be sarcastic, incredulous, or simply
> ignorant here.
If a programming language supports calling /any/ foreign language, that
language will always be C. It will know about standard C types, it will
usually know about C structs, and it will let you call arbitrary C
functions.
And yet, the way that you call a C function is, apparently, undefined.
That's pretty bizarre.
It also makes me wonder how the heck it's possible to take object code
from multiple C compilers and link it all together, if each of them is
potentially using a completely different calling convention. It sounds
like it shouldn't work.
Post a reply to this message
|
![](/i/fill.gif) |