News for hackers. Stuff that matters.
Re:Ruby 3.0 Preview 1 by chrisoverzero on Friday September 25, 2020 @07:31PM (#24595101)
>.NET went with non-standard SQL-like names (select/where) […]

Which names do you believe are standard?

Re:Ruby 3.0 Preview 1 by rpastuszak on Friday September 25, 2020 @07:42PM (#24595166)
Arguably, select/where are less familiar than map/filter to many. I'm not saying that either is a standard, but I can imagine the confusion if you come from say, JS background.
Re:Ruby 3.0 Preview 1 by fomine3 on Tuesday September 29, 2020 @04:28AM (#24625310)
To be fair, map/filter wasn't so popular like now when C# 3.0 (released in 2008) was designed.
Re:Ruby 3.0 Preview 1 by philwelch on Friday September 25, 2020 @07:38PM (#24595143)
Not who you’re responding to but from context I would assume map/filter, as he said.
Re:Ruby 3.0 Preview 1 by EdwardDiego on Friday September 25, 2020 @10:01PM (#24595848)
`where` is intuitive as a synonym for `filter`, but it's the `select` that always threw me as a synonym for `map`.

I get that they're trying to expose an SQL-like API, but yeah, map is always about mutation, but `select`only does mutation sometimes in SQL.

Re:Ruby 3.0 Preview 1 by monadic2 on Saturday September 26, 2020 @02:21AM (#24596817)
Map doesn't mutate, it returns the result of applying a function to the (possibly immutable) value. I believe you can also, say, `select icolumn * 2 from table`, where `icolumn * 2` provides precisely the same functionality as the function passed to a map.
Re:Ruby 3.0 Preview 1 by jen20 on Friday September 25, 2020 @11:53PM (#24596281)
`Where` at least answers the question "does filter _keep_ the things matching the predicate or _remove_ the things matching the predicate" - my pet hate with the .NET naming is `SelectMany` over `flatmap`.