Functional programming in Python

Manuel M. T. Chakravarty
Mon, 07 May 2001 15:01:47 +1000

Two quite interesting articles about FP in Python are over
at IBM developerWorks:

Two IMHO interesting things to note are the following:

* In Part 1, at the start, there is a bullet list of what
  the author regards as FP "features".  I found the
  following interesting about this list:

  - There is no mention of the emphasis placed on strong
    typing in many modern functional languages.

  - The author makes it sound as if FP can't handle
    imperative features, whereas I would say that this is a
    problem of the past and wasn't an issue in many FP
    languages (Lisp, ML, ...) in the first place.

    The opinion of the author is not really suprising, but I
    think, it indicates a problem in how FP presents itself
    to the rest of the world.

* In Part 2, the author writes at the end:

    I have found it much easier to get a grasp of functional
    programming in the language Haskell than in Lisp/Scheme
    (even though the latter is probably more widely used, if
    only in Emacs).  Other Python programmers might
    similarly have an easier time without quite so many
    parentheses and prefix (Polish) operators.

  I think, this is interesting, because both Lisp and Python
  are dynammically typed.  So, I would have expected the
  strong type system to be more of a hurdle than Lisp's
  syntax (or lack thereof).