{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/phobos/issues/4733","repository_url":"https://api.github.com/repos/dlang/phobos","labels_url":"https://api.github.com/repos/dlang/phobos/issues/4733/labels{/name}","comments_url":"https://api.github.com/repos/dlang/phobos/issues/4733/comments","events_url":"https://api.github.com/repos/dlang/phobos/issues/4733/events","html_url":"https://github.com/dlang/phobos/pull/4733","id":171161484,"number":4733,"title":"Make GCAllocator const -> makeArray pure","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dlang/phobos/labels/@andralex","name":"@andralex","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-15T12:34:35Z","updated_at":"2016-08-30T11:38:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dlang/phobos/pulls/4733","html_url":"https://github.com/dlang/phobos/pull/4733","diff_url":"https://github.com/dlang/phobos/pull/4733.diff","patch_url":"https://github.com/dlang/phobos/pull/4733.patch"},"body":"This is a follow-up to the recent `@safe` improvement to `makeArray` of `std.allocator`.\r\n\r\nThe biggest problem of the `GCAllocator` is it's sharedness which makes it impossible to write `pure` code even though the GCAllocator is used by default. Hence I propose to make the `instance`  `const` and thus a lot of methods `pure`.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dlang/phobos/issues/comments/243412290","html_url":"https://github.com/dlang/phobos/pull/4733#issuecomment-243412290","issue_url":"https://api.github.com/repos/dlang/phobos/issues/4733","id":243412290,"user":{"login":"andralex","id":566679,"avatar_url":"https://avatars.githubusercontent.com/u/566679?v=3","gravatar_id":"","url":"https://api.github.com/users/andralex","html_url":"https://github.com/andralex","followers_url":"https://api.github.com/users/andralex/followers","following_url":"https://api.github.com/users/andralex/following{/other_user}","gists_url":"https://api.github.com/users/andralex/gists{/gist_id}","starred_url":"https://api.github.com/users/andralex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andralex/subscriptions","organizations_url":"https://api.github.com/users/andralex/orgs","repos_url":"https://api.github.com/users/andralex/repos","events_url":"https://api.github.com/users/andralex/events{/privacy}","received_events_url":"https://api.github.com/users/andralex/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T11:38:30Z","updated_at":"2016-08-30T11:38:30Z","body":"I'd want to avoid this trick if we can. The reality in the field is that `GCAllocator` is a `shared` object. (This is the case even though we don't have access to the state.) The current code models that reality. Yes, we did make a concession for `new` to allow pure functions to allocate, but I don't want to use that as precedent to essentially model things that don't exist.\r\n\r\nI suggest we leave the low-level allocators alone. Then use a cast to force makeArray be pure."}}
{"actor":{"display_login":"andralex"}}