{"action":"opened","issue":{"url":"https://api.github.com/repos/goby-lang/goby/issues/616","repository_url":"https://api.github.com/repos/goby-lang/goby","labels_url":"https://api.github.com/repos/goby-lang/goby/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/goby-lang/goby/issues/616/comments","events_url":"https://api.github.com/repos/goby-lang/goby/issues/616/events","html_url":"https://github.com/goby-lang/goby/issues/616","id":303485346,"number":616,"title":"[feature request] Should Goby support any object in Hash keys?","user":{"login":"nerde","id":1740401,"avatar_url":"https://avatars1.githubusercontent.com/u/1740401?v=4","gravatar_id":"","url":"https://api.github.com/users/nerde","html_url":"https://github.com/nerde","followers_url":"https://api.github.com/users/nerde/followers","following_url":"https://api.github.com/users/nerde/following{/other_user}","gists_url":"https://api.github.com/users/nerde/gists{/gist_id}","starred_url":"https://api.github.com/users/nerde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerde/subscriptions","organizations_url":"https://api.github.com/users/nerde/orgs","repos_url":"https://api.github.com/users/nerde/repos","events_url":"https://api.github.com/users/nerde/events{/privacy}","received_events_url":"https://api.github.com/users/nerde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T13:49:02Z","updated_at":"2018-03-08T13:49:02Z","closed_at":null,"author_association":"NONE","body":"Ruby allows any object to be used as hash keys. And during the lookup (`[]`), it uses `hash` to calculate a unique number for the given key object and find its bucket and then `eql?` to compare keys and find its value: https://ruby-doc.org/core-2.1.0/Object.html#method-i-hash\r\n\r\nI think it would be interesting to have at least something similar. Goby could add support for `hash` method, which is based on memory address by default, and switch from `map[string]Object` to `map[int64]Object`. Then in the lookup, it would invoke `hash` on the given key and use that to find the value."}}
{"actor":{"display_login":"nerde"}}