News for hackers. Stuff that matters.
Re:"Useless syntax sugar": Numbered block parameters in Ruby by dragonwriter on Thursday October 12, 2023 @04:11AM (#37854666)
>That's why most of the enumeration methods in Ruby match the names of similar methods in Smalltalk ("collect", "reject", "select", etc.) and not the corresponding names in functional languages ("map", "reduce", "filter").

Ruby has both, actually; "map" is a synonym for "collect", "reduce" is a synonym for "reject", and "filter" is a synonym for "select" (well, actually, they are both synonyms for "find_all"). And the non-Smalltalk names seem to have had more influence on newer methods, e.g., Enumerable has filter_map, but not select_collect, even as a synonym.

Re:"Useless syntax sugar": Numbered block parameters in Ruby by zverok on Thursday October 12, 2023 @04:33AM (#37854788)
Ruby didn't always had both. `reduce` as an alias for `inject` was introduced in Ruby 1.8.7; `filter` as late as in Ruby 2.6 (just a few years ago, and most of the codebases I saw are still preferring `select`).

Yes, the dictionary is normalized in the last years towards what became industry/mainstream standard names for the concepts, but the statement that initial names were derived from Smalltalk is correct.