Of what use is 'lambda'???

Steven D. Majewski sdm7g at virginia.edu
Tue Sep 19 13:26:19 EDT 2000


Note that anonymous expressions are also an unnecessary conveniece.
You can do all the same things without them, but you end up with
a language rather like assembler, where everything has to have
a name -- either an address or a register, which is awfully 
inconvenient.


   two = 2
   three = 3 
   tmp = whatever

   tmp = two + three
   tmp = tmp * two 

 instead of, with anonymous temps:

   ( 2 + 3 ) * 2 



This was *the* major advantage of Fortran and other computer
languages over assembler.  Most of the other stuff -- multi
word operators, control structures like 'while', 'for', etc.
can all be done in macro assembler, and in fact the only 
awkwardness in using macro assembler to do it is that you 
need some conventions for handling temporary storage that 
you are not allowed to "step on" in your own assembler code. 

(Not to mention that using macro coded while-loops and other
 such stuff seemed to slow the assembler to a crawl -- but 
 despite that, some folks did try to do "structured assembler
 programming" back before C got popular.) 

Most computer programs use a lot more variables than functions,
so the advantage of anonymous function expressions is not as 
obvious unless you do a lot of functional programming. 


---|  Steven D. Majewski   (804-982-0831)  <sdm7g at Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---
		"All operating systems want to be unix, 
		 All programming languages want to be lisp." 




More information about the Python-list mailing list