Software bugs aren't inevitable

phil hunt zen19725 at zen.co.uk
Fri Sep 16 11:47:12 EDT 2005


On Fri, 16 Sep 2005 20:36:02 +1000, Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:
>On Thu, 15 Sep 2005 18:07:28 +0100, phil hunt wrote:
>
>> On Thu, 15 Sep 2005 21:56:06 +1000, Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:
>>>
>>>Are you saying that the recursion done by "serious" languages is a fake?
>>>That it is actually implemented behind the scenes by iteration?
>>>
>>>It seems to me that if recursion and iteration produce "the exact same
>>>machine code", the argument for preferring recursion over iteration is
>>>gutted.
>> 
>> It seems to me that if a high level language and assembler produce
>> "the exact same machine code", the argument for preferring high
>> level languages is gutted.
>> 
>> Do you see the fallacy in your statement now?
>
>Ah, yes, you got me on that one.
>
>But there is a difference: writing assembly is *hard*, which is why we
>prefer not to do it. Are you suggesting that functional programming is
>significantly easier to do than declarative?

No. I'm saying that under some circumstances it might be easier to 
write code as a recursive routine than a loop. In those 
circumstances, why should I care if the compiler then re-encodes my 
recursive routine as a loop, so long as the program gives the 
correct answer.

Compilers/interpreters/runtimes are black boxes: we don't (or
shouldn't) care how they do their work as long as they run correctly 
and aren't too heavy on system resources like CPU time and memory.


-- 
Email: zen19725 at zen dot co dot uk





More information about the Python-list mailing list