On Sun, 13 Jun 2010 18:35:52 -0700, alex23 wrote: > I have little sympathy for Steven's > hypothetical "new programmer who isn't familiar with map and reduce".
Perhaps you need to spend some more time helping beginners then, and less time hanging around Lisp gurus *wink* > Python isn't PHP, its built-ins are nowhere near as exhaustive, > something like 80ish vs 2000+ functions? Not exactly a huge lookup > burden. It's not the lookup burden, but the mental burden of grasping the idea of functions-as-data. Higher-order functions (functions that take functions as data) are notoriously difficult for many people to grasp, and even some programmers of the calibre of Guido van Rossum never get entirely comfortable with (e.g.) reduce. That's why Guido recommends people use a for-loop instead of reduce, apply was removed entirely, and list comps were introduced as a more friendly alternative to map. I'm certainly not saying that people should avoid higher-order functional code, but merely to remember that map and filter aren't introductory concepts, they're moderately advanced functions that many people find difficult. -- Steven -- http://mail.python.org/mailman/listinfo/python-list