{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12627","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12627/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12627/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12627/events","html_url":"https://github.com/JuliaLang/julia/issues/12627","id":101092924,"number":12627,"title":"Feature Request: Static Variables","user":{"login":"JaredCrean2","id":10292902,"avatar_url":"https://avatars.githubusercontent.com/u/10292902?v=3","gravatar_id":"","url":"https://api.github.com/users/JaredCrean2","html_url":"https://github.com/JaredCrean2","followers_url":"https://api.github.com/users/JaredCrean2/followers","following_url":"https://api.github.com/users/JaredCrean2/following{/other_user}","gists_url":"https://api.github.com/users/JaredCrean2/gists{/gist_id}","starred_url":"https://api.github.com/users/JaredCrean2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaredCrean2/subscriptions","organizations_url":"https://api.github.com/users/JaredCrean2/orgs","repos_url":"https://api.github.com/users/JaredCrean2/repos","events_url":"https://api.github.com/users/JaredCrean2/events{/privacy}","received_events_url":"https://api.github.com/users/JaredCrean2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-14T20:05:09Z","updated_at":"2015-08-14T20:15:25Z","closed_at":null,"body":"As I have been programming in Julia, I have run into a situation where I want to use a temporary (usually an array) for use every time a function, but don't want to allocate a new one every time.  In C, this would be easily done using a `static` variable.  In Julia, something similar could be accomplished using global variables, but if the type of the static variable depends on the type of the function arguments, this causes type instability.\r\n\r\nSo, the request is for static variables where each compiled method of the function has its own variable, whose type is determined by type inference."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/131228362","html_url":"https://github.com/JuliaLang/julia/issues/12627#issuecomment-131228362","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12627","id":131228362,"user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T20:15:25Z","updated_at":"2015-08-14T20:15:25Z","body":"This would remove a lot of my consts sitting just above the method definition."}}