functional programming

Michal Wallace (sabren) sabren at manifestation.com
Tue Feb 22 19:08:17 EST 2000


On Tue, 22 Feb 2000, Moshe Zadka wrote:

> Functional programming has a very clear definition: no side
> effects. Iterating explicitly means "with side effects." I'm not saying
> one style is better then the other, but you *can't* program functionally
> in Python. I had to get over it, and learn to write fibonaci with a while
> loop, when I first got to Python.

Hey Moshe,

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?

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?

Cheers,

- Michal
-------------------------------------------------------------------------
http://www.manifestation.com/         http://www.linkwatcher.com/metalog/
-------------------------------------------------------------------------







More information about the Python-list mailing list