News for hackers. Stuff that matters.
Re:Joel Spolsky: Can your programming language do this? by radiowave on Saturday April 23, 2011 @07:44AM (#2476677)
Most likely Ruby takes the name inject from Smalltalk. (Smalltalk also uses 'collect' for map, 'select' for filter, 'reject' for an inverse filter.)
Re:Joel Spolsky: Can your programming language do this? by kgo on Saturday April 23, 2011 @12:13PM (#2477052)
Thank you for pointing out the history! The names inject, collect, select, and reject drive me crazy for some reason. Maybe it's because they rhyme. But every time I saw them, I wondered why Matz made these up instead of using map/filter/reduce. At least now I know.