Can one use Python to learn and even apply Functional Programming?

Chris Angelico rosuav at gmail.com
Sun Feb 16 00:34:09 EST 2014


On Sun, Feb 16, 2014 at 3:45 PM, Sam <lightaiyee at gmail.com> wrote:
> I would like to learn and try out functional programming (FP). I love Python and would like to use it to try FP. Some have advised me to use Haskell instead because Python is not a good language for FP. I am sort of confused at the moment. Is Python a dysfunctional programming language to apply FP? Can the more experienced Python users advise?
>

Functional programming is a particular style. Python supports some of
that style, but it certainly doesn't enforce it; if you want to learn
how to work within a functional style, you'd do better with a language
that won't let you do anything else.

Python does have a number of extremely handy notations, borrowed from
more functional languages. But it's not a functional language,
primarily. It's what you might call "multi-paradigm" [1], but
primarily imperative and object-oriented (everything's an object).

ChrisA

[1] My buzzword limiter is starting to smoke



More information about the Python-list mailing list