r/Python • • Nov 11 '08

Why the hatred for functional programming?

0 Upvotes

86 comments sorted by

View all comments

5

u/Wiseman1024 Nov 11 '08 edited Nov 11 '08

Okay, I don't think I need to tell why I'm asking this. While Python supports functional programming to a reasonable extent, there's a widespread stubborn hatred of functional programming and anything related to it in the Python community (probably starting with the BDFL), and any proposals for extending Python into something more useful for functional programming (without taking out any of the other ways to use Python, of course, that's the good thing about multi-paradigm languages) is received with ruthless hostility and perceived as an attack against Python.

The Python community is generally a good one (especially compared to others), yet this generalized hatred for functional programming and anything related to it seriously turns me off. While Python is currently my overall favourite programming language (considering the quality of the standard and non-standard libraries, support, and features), I'm currently considering putting my effort and time investments somewhere less hostile to functional programming.

Hostility to functional programming is a form of hostility to abstraction, theoretical correctness and cleanliness. I hope I'm wrong, but this seems like pulling the PHP way. Consistently meeting proposals such as tail call elimination with nothing short of "that's liek difficult to understand d00d ha ha no freaking way" doesn't say much about the health of this community; in fact it looks like something straight out of the average PHP documentation comment.

6

u/sard Nov 11 '08 edited Nov 11 '08

that's the good thing about multi-paradigm languages

I don't think the BDFL is interested in creating a multi-paradigm language. He's much more interested in a 'one obvious consistent Pythonic way of doing everything' language, and that one way historically hasn't been functional.

3

u/Wiseman1024 Nov 11 '08

Then instead of getting the best possible language in its domain, he'll get the most Pythonic language, for an arbitrary and sometimes bizarre definition of Pythonic.

5

u/earthboundkid Nov 11 '08

There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.

1

u/Wiseman1024 Nov 11 '08

From my other post:

There should be one-- and preferably only one --obvious way to do it.

I used to think this is a good idea, but I'm seeing it leads to "Pythonic", and "Pythonic" leads to a sub-optimal language.

Although that way may not be obvious at first unless you're Dutch.

I'm not worried if it's not obvious. I'm worried that it's not good.

2

u/earthboundkid Nov 11 '08 edited Nov 12 '08

This goes back to my point: if you don't like the pythonic style, don't use Python. I guess what you want is for someone to take the Python library and to adapt it to work with a Lisp-like language or something. But if that's the goal, why not just use Clojure which has the whole Java library?

1

u/Wiseman1024 Nov 12 '08 edited Nov 12 '08

I'm seriously considering writing a Lisp compiler for CPython myself. (A Lisp-1 with proper tail recursion, of course.) Something like Lython or Psyche, updated for today's Python. I think those were awesome ideas, and I'm saddened to find they're abandoned.

If only I had more time. I have to choose between doing what I want to get done, or doing what I'd like to have to do what I want to get done.

I'm also considering moving to Clojure once it's a bit more mature, or perhaps making a wilder jump to Erlang. I'm terribly attracted to obscure Schemes with object systems, but I know that's going to have no support, no community, and pretty often no documentation (heck, even Tiny-CLOS for PLT is largely undocumented).

1

u/Wiseman1024 Nov 12 '08 edited Nov 12 '08

For the love of all things good, can you explain me why would you downmod a post where I'm talking about implementing something myself? Would you rather me not release it if I finally do it? To that extent do some redditors' flamboyant fanboyism get?