r/programming • u/stesch • Aug 30 '08
Tour De Babel -- Rant about programming languages (at Amazon)
http://steve.yegge.googlepages.com/tour-de-babel
15
Upvotes
r/programming • u/stesch • Aug 30 '08
View all comments
Show parent comment
7
u/[deleted] Aug 31 '08
All three of those functions are built-ins because they operate on any object that looks like a sequence, including lists, tuples, generators, iterators, strings, and any user-defined object that can be iterated over. If I want to write a list-like object without inheriting from
list, should I have to write stubmap/reduce/lenmethods just in case someone wants to use them? Wouldn't it be smarter to implement these very generic functions as something that will work on any list-like object?