From: marcandre-ruby-core@... Date: 2021-03-28T03:17:48+00:00 Subject: [ruby-core:103067] [Ruby master Feature#17472] HashWithIndifferentAccess like Hash extension Issue #17472 has been updated by marcandre (Marc-Andre Lafortune). duerst (Martin D�rst) wrote in #note-20: > Javascript doesn't have symbols in the first place Actually, it does (since ES 6): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol String are meant for input/output of text. Symbols are identifier for developers. A program written in English for French users would have its symbols in English and its strings in French... In any case, that some people disagree with the validity of the distinction of Symbols and Strings, it is not going away. There's not much point discussing that. ---------------------------------------- Feature #17472: HashWithIndifferentAccess like Hash extension https://bugs.ruby-lang.org/issues/17472#change-91128 * Author: naruse (Yui NARUSE) * Status: Open * Priority: Normal * Target version: 3.1 ---------------------------------------- Rails has [ActiveSupport::HashWithIndifferentAccess](https://api.rubyonrails.org/classes/ActiveSupport/HashWithIndifferentAccess.html), which is widely used in Rails to handle Request, Session, ActionView's form construction, ActiveRecord's DB communication, and so on. It receives String or Symbol and normalize them to fetch the value. But it is implemented with Ruby. If we provide C implementation of that, Rails will gain the performance improvement. summary of previous discussion: https://github.com/rails/rails/pull/40182#issuecomment-687607812 -- https://bugs.ruby-lang.org/ Unsubscribe: