Why not use juxtaposition to indicate function application

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Fri Mar 16 09:14:59 EDT 2012


On Mar 16, 1:45 pm, Ray Song <emacs... at gmail.com> wrote:
> I confess i've indulged in Haskell and found
>     f a
> more readable than
>     f(a)

Hmmm... What about:

    f a b

versus

    f(a(b))

or was it supposed to be read as

    f(a)(b)


or as

   f(a, b)

?-)



> And why aren't functions curried (partially applied function is another function which takes the rest arguments) by default?


If you're asking "why isn't Python like Haskell", the obvious answer
is, well, "because Python is not Haskell" ;)

Remember that Pythons is first and foremost an object-oriented
language, where most of the support for functional idioms comes from
the underlying object model. functions are central to fp, objects are
central to OOP, so better to use objects than functions (hint: there's
a builtin "partial" type).




More information about the Python-list mailing list