{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/19324","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/19324/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/19324/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/19324/events","html_url":"https://github.com/JuliaLang/julia/pull/19324","id":189236901,"number":19324,"title":"RFC: deprecate hard/soft scope distinction","user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"labels":[{"id":514135802,"url":"https://api.github.com/repos/JuliaLang/julia/labels/deprecation","name":"deprecation","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"assignees":[{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/4","html_url":"https://github.com/JuliaLang/julia/milestone/4","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/4/labels","id":96266,"number":4,"title":"1.0","description":"","creator":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars2.githubusercontent.com/u/153596?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"open_issues":80,"closed_issues":258,"state":"open","created_at":"2012-03-15T04:57:43Z","updated_at":"2017-10-24T16:10:56Z","due_on":null,"closed_at":null},"comments":32,"created_at":"2016-11-14T21:53:09Z","updated_at":"2017-10-24T19:50:36Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/19324","html_url":"https://github.com/JuliaLang/julia/pull/19324","diff_url":"https://github.com/JuliaLang/julia/pull/19324.diff","patch_url":"https://github.com/JuliaLang/julia/pull/19324.patch"},"body":"This PR examines the impact of deprecating (much of?) the distinction between hard/soft scope. Instead it simply distinguishes between global and local scope. This means that all scope-blocks introduce the same type of scope (local), rather than distinguishing that toplevel functions have special, hard scope rules. I've updated the manual to try to show how this change would impact the user. The main change is that there would no longer be the concept of implicit globals computed from examining the module bindings. Instead the global/local computation would be purely syntactic. For example, take the following code snippet:\r\n\r\n```julia\r\nglobal x = 0\r\nfor x = 1:10 end\r\n@show x\r\n```\r\n\r\nUnder the current, this shows `10`, because `x` had a value before the for-loop.\r\nUnder the new rules, this shows `0`, since the for-loop introduce a new local scope.\r\n\r\nMaking this code work as before would requiring declaring `x` to be a global inside the for-loop scope block:\r\n```julia\r\nfor x = 1:10; global x; end\r\n```\r\n\r\nAnother option that this PR still permits is to make an assignment to x inside a begin/end block:\r\n```julia\r\nbegin\r\n  x = 0\r\n  for x = 1:10 end\r\nend\r\n@show x\r\n```\r\n\r\nThe impact to base is small (two corrections to code that will be broken anyways when #265 is fixed).\r\n\r\nThe impact to tests is larger, as it takes a large number of unintentionally-global variables and causes them to emit a deprecation warning. I think the resulting changes are arguably beneficial, even if we don't decide to change the scoping rules, since they reduce the number of objects being kept around in global variables."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/339110392","html_url":"https://github.com/JuliaLang/julia/pull/19324#issuecomment-339110392","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/19324","id":339110392,"user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"created_at":"2017-10-24T19:50:36Z","updated_at":"2017-10-24T19:50:36Z","author_association":"MEMBER","body":"Good catch. Looks like I had pushed those to the wrong branch."}}
{"actor":{"display_login":"vtjnash"}}