Hacker News new | past | comments | ask | show | jobs | submit login
Is Functional Programming the new Python? (paulspontifications.blogspot.com)
19 points by edw519 on May 10, 2008 | hide | past | web | favorite | 13 comments



The reason for the low variance in python solution times is a design feature: "there should be one -- and preferably only one -- obvious way to do it" (Guido).

Of course there is often more than one way to do anything in python. For instance, Guido prefers list comprehensions to using map even though both drop down to the C-layer for improved performance whereas iterating/looping generally does not. Most python programmers, however, seem to stay away from the functional programming aspects of python, if their code is any indication.

Although python has the basics of functional programming: map, reduce, lazy evaluation (for some iterators/generators), its support for lambda functions is clumsy and many advanced features (such as monads) are not present in the standard libraries at all. Python lets you experiment with functional programming but that's about it.


what about java's OOP only? why wouldn't the design lower variance?

my take is that java's high variability is caused by its verbosity: more codes = more 'moving parts' = more things that can go wrong

to disprove my theory, give me a verbose language with low variability in solution times


It seems like FP is an ideal candidate for the Python Paradox. If, at this point, you draw in programmers who are genuinely fluent in a functional language, you know they're almost certainly smart, and you know they're almost certainly dedicated to their craft.

All you really need to figure out then is whether they'll crank out shipping code for you, instead of producing a really fascinating paper on the calculus of arrows or something.


They have thier uses but will not be readily adopted as Python as it is too hard for most people to change thier thinking to functional programming.


That's even better for the argument being made, which is that Python used to be a good weeder language (since the only people who knew it tended to be real hackers) but it no longer is, because more people have learned it just to do their jobs. If functional languages are really too difficult to ever get widespread adoption (which I doubt), that makes it even more likely that functional languages are and will continue to be good languages to use if you want to attract only smart people.

Edit: your other comments in this thread also don't seem to be addressing the article. The article is running with the idea that more obscure languages are better - because widespread adoption means that poorer programmers will learn it in order to get jobs.


just because something is difficult to learn does not make it a goog weeder. Python/Perl/etc. were not thatdifficult to learn and back in late 90s were goog indicators as people who used them were focused on getting things done easily and efficiently as possible.

This, and the the fact that generally they were not taught at college/undergrad level, menat people who had learnt them were self-developers and/or early adopters etc. who had a "real" interest/passion and which then helped to differentiate them from the general masses.

Just because you know a functional language does not neccessarily make you any more/less smart. I know plenty of people who are brilliant at things like ML (they have maths backgrounds) but not so great at bigger picture thinking and putting it all together. the really smart ones are people who can do that.

Just imho how I see things.

Sorry if I was off topic in posts, maybe I was missing points as reposonding to many things at once.


Could be interesting to investigate what new (or old) approach to programming might act as a filter if functional programming ever goes mainstream.



Right. That's the exact same essay that the linked article was talking about...is there something you wanted to say about it?


I made sloppy link insert as a comment in haste, no real purpose or reason. I must have come into the discussion through user comment history from another article and thought the topic was on that other article. In essence I was replying just to the commenter and not the overall posted article.


It's not that it's hard, it's just that it violates the readability tenet of python. You can see online GVR himself scolding people for producing semi-functional code because it turns out to be a mess.


No. These languages have been around for a long time (I used ML in uni 10 years ago) and have never taken off in a big way.


The test of time is the best test in my book, and hence they fail in this case as over time Python still seems to be the favoured.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: