Hacker Newsnew | comments | show | ask | jobs | submit login
Python's Functional Training Wheels (thecomputersarewinning.com)
15 points by ithayer 1522 days ago | 5 comments



I disagree with map/filter/reduce being "key" in Python. I've been writing Python for a long time and I never use them. Comprehensions are more pythonic than map+filter, and reduce just doesn't come up. Here's Guido explaining why he wanted to move all three functions out of builtins in Python 3:

http://www.artima.com/weblogs/viewpost.jsp?thread=98196

-----


My intent there was not to say that they are key in python, but rather in more functional languages.

Yet another reason I worry that Python 3 may fracture the community...

-----


Reduce got banished to functools, but map and filter are still around. So people can process collections using the lispy style if they like. I just hope they realize that it's only a difference in style.

-----


I don't see why, list comprehensions have superseded map and filter and I don't see them as anything other than a more readable version of them...

-----


reduce() is a handy function. I agree that map and filter could be replaced easily with list comprehensions. I personally find list comprehensions to be more explicit and easier to read.

-----




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

Search: