merits of Lisp vs Python

Jon Harrop jon at ffconsultancy.com
Sun Dec 10 02:15:59 EST 2006


Ken Tilton wrote:
> André Thieme wrote:
>> def foo(function, args):
>>   setup(1)
>>   setup(2)
>>   function(args)
>>   cleanup(1)
>>   cleanup(2)
>> 
>> The nice thing in Lisp would now be to save a lambda with the macro.
>> In Python one would fill the name space with throw away functions that
>> get called only one time.

That is a deficiency of Python that doesn't exist in modern FPLs like OCaml,
SML, Haskell, F#...

> Omigod. Is that what you meant? You think macros are unnecessary because
> one could hard-code their expansions as separate functions? And that
> would constitute hiding the boilerplate? What happens when the
> boilerplate changes? <game over>

He is correct. When the boilerplate changes, you change your HOF.

-- 
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet



More information about the Python-list mailing list