From: merch-redmine@... Date: 2019-09-02T04:15:58+00:00 Subject: [ruby-core:94712] [Ruby master Feature#12157] Is the option hash necessary for future Rubys? Issue #12157 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed With the acceptance of #14183, this can be closed. The behavior in Ruby 3 will be that `**args` in a method call will set keyword arguments if the method accepts keyword arguments, and will be a positional hash argument if the method does not (unless args is empty, in which case no argument will be added). ---------------------------------------- Feature #12157: Is the option hash necessary for future Rubys? https://bugs.ruby-lang.org/issues/12157#change-81322 * Author: justcolin (Colin Fulton) * Status: Closed * Priority: Normal * Assignee: * Target version: ---------------------------------------- Option hashes were great before Ruby had named arguments, but with the addition of named arguments and the double splat operator are they still needed? One can convert named arguments into an option hash by using the double splat operator in the parameter list, so option hashes are redundant. More importantly, the existence of both option hashes and named arguments is creating odd or ugly edge cases. See #12022, #10708, and #11860. Legacy software can mostly be updated using a double splatted parameter, so it shouldn't be a hard shift to make. What do you all think? _Apologies if this discussion has happened before. I searched for a bit but couldn't turn anything up._ -- https://bugs.ruby-lang.org/ Unsubscribe: