{"action":"created","issue":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4571","labels_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4571/labels{/name}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4571/comments","events_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4571/events","html_url":"https://github.com/D-Programming-Language/dmd/pull/4571","id":67159992,"number":4571,"title":"Add ability to create int[int] AAs in the data segment","user":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-08T15:47:25Z","updated_at":"2015-04-10T10:25:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4571","html_url":"https://github.com/D-Programming-Language/dmd/pull/4571","diff_url":"https://github.com/D-Programming-Language/dmd/pull/4571.diff","patch_url":"https://github.com/D-Programming-Language/dmd/pull/4571.patch"},"body":"It's not that hard to support at least built-in types for AA keys.\r\n\r\nAny interest?  If so I can do other integral types and strings pretty easily."},"comment":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/comments/91508197","html_url":"https://github.com/D-Programming-Language/dmd/pull/4571#issuecomment-91508197","issue_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4571","id":91508197,"user":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T10:25:52Z","updated_at":"2015-04-10T10:25:52Z","body":">>> adds more magic capabilities to the builtin AA (though it should be simple to support this in a library AA)\r\n\r\n>> I disagree, this is something that a library AA would/should support automatically.\r\n\r\n>So you actually agree ;).\r\n\r\nI... I don't think so.  It's only magic if the library AA wouldn't support it.  A library AA can be put in the data segment with the current compiler.\r\n\r\n> Please let's not dissipate even more time going in the wrong direction, frustrating people, and trying to explain/document all of that.\r\n\r\nI think it's worthwhile, because this is a very frustrating limitation.  I don't know when the library AA will be available. A year from now?  Two?  We can cover a huge number of use cases trivially by the next release.\r\n\r\nI don't think this is going in the wrong direction at all, from the user's perspective.  If a library AA was to be implemented, the code I've added would never be reached as the AA literal would have been lowered to a struct/class expression already, so it doesn't hurt that effort apart from raising expectations.\r\n\r\nI think we've held back long enough, perfect is the enemy of better, etc\r\n\r\n> What keeps you from supporting all kinds of keys and values, the hash computation?\r\nThat might be a useful intermediate step.\r\n\r\nYeah, nothing too serious.  Supporting user-defined hashes of classes/structs is quite complicated (have to invoke ctfe, could fail) but all built-in types can be done fairly easily.  (And will be done soon probably)"}}