A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/335910.html below:

Software bugs aren't inevitable

Software bugs aren't inevitableJerzy Karczmarczuk karczma at info.unicaen.fr
Thu Sep 15 08:30:57 EDT 2005
Steven D'Aprano wrote:
> On Wed, 14 Sep 2005 12:23:00 -0700, Paul Rubin wrote:

>>Every serious FP language implementation optimizes tail calls and thus
>>using recursion instead of iteration doesn't cost any stack space and
>>it probably generates the exact same machine code.
> 
> 
> 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.

Well, in such a way we can discuss for eternity...
Please, distinguish between the high-level algorithm formulation, and what
computer does under the carpet.

The recursion - as put forward by functionalists is a conceptual way of
thinking. With passing of new parameters without explicitly updating the
variables to which the old ones are assigned. Without loop control
variables, nor looping constructs.
    You don't reassign your variables, you avoid the side-effects. The
programs are often clearer and safer, less error-prone.

Now, the ugly world of basic computing at the assembly level is imperative,
not functional (within standard architectures). The registers ARE
reassigned. The stack must be explicitly handled, etc. You *SEE* explicitly
the iterative structures.

The point of functionalists is that one should avoid that, and leave those
nasty things to the compiler. That's all. Your final conclusion is for me
rather inacceptable. It is not the machine code which matters, but
human effort [provided you spent sufficient time to be fluent in *good*
recursive programming of complex tasks.]


Jerzy Karczmarczuk

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4