Of what use is 'lambda'???

Kragen Sitaker kragen at dnaco.net
Mon Sep 25 00:38:32 EDT 2000


In article <86r969qxo9.fsf at jfb.dsl.visi.com>,
James Felix Black  <jfb at visi.com> wrote:
>> > To start with, in functional programming everything returns a value.
>> 
>> That's true in C and Inform, but I think both are traditionally
>> regarded as procedural.  Is the difference that the returned 
>> value is always significant?  Or is there more?
>
>In a functional language, unlike C or Python, there are no side
>effects;

Which means that if something doesn't return a value you care about,
you might as well not have executed it.

> all functions, when called with the same arguments, are
>guaranteed to produce identical results.  In addition, functional
>languages are referentially transparent.

"referentially transparent" is another way of saying "has no side
effects".  The identical-results sentence is stronger, and the other
statements follow from it.
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Perilous to all of us are the devices of an art deeper than we ourselves
possess.
                -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]



More information about the Python-list mailing list