functional programming

Moshe Zadka moshez at math.huji.ac.il
Wed Feb 23 01:25:57 EST 2000


On Tue, 22 Feb 2000, Michal Wallace (sabren) wrote:

> I guess my original question had to do with what functional
> programming looks like in the wild, and what it might look like in
> python. Aahz posted a recursive version of a fib() routine. Is this
> not what you'd want? What would fib() look like in one of the
> functional languages you're used to?

Exactly like Aahz's, I guess, except it would consume O(1) space.

> Part of the reason I'm asking about this is that I have an idea for a
> preprocessor that would allow different kinds of syntactic sugar for
> things that are possible, but not necessarily pretty, in python. If
> python could do what you really want, how would it look?

I'm not sure I *want* Python to be functional. And besides, tail recursion
would be hard to do as pre-processing: post processing the byte codes or
changing the byte code interpreter seems a more promising route.

to-a-desolate-future-ly y'rs, Z.
--
Moshe Zadka <mzadka at geocities.com>. 
INTERNET: Learn what you know.
Share what you don't.





More information about the Python-list mailing list