POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Days 5- Server Time
29 Jul 2024 16:28:48 EDT (-0400)
  Re: Days 5-  
From: Invisible
Date: 23 Apr 2012 04:31:34
Message: <4f951366$1@news.povray.org>
>> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.