{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16339","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16339/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16339/comments","events_url":"https://api.github.com/repos/golang/go/issues/16339/events","html_url":"https://github.com/golang/go/issues/16339","id":165179573,"number":16339,"title":"Proposal: Alias declarations for Go","user":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Proposal","name":"Proposal","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"assignees":[{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/30","html_url":"https://github.com/golang/go/milestones/Proposal","labels_url":"https://api.github.com/repos/golang/go/milestones/30/labels","id":1373555,"number":30,"title":"Proposal","description":"Proposals that are pending (not yet accepted/rejected).\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":32,"state":"open","created_at":"2015-10-24T01:40:49Z","updated_at":"2016-07-29T21:04:14Z","due_on":null,"closed_at":null},"comments":247,"created_at":"2016-07-12T21:00:07Z","updated_at":"2016-07-30T17:43:02Z","closed_at":null,"body":"**Abstract**\r\nWe propose to add alias declarations to the Go language. An alias declaration introduces an alternative name for an object (type, function, etc.) declared elsewhere. Aliases simplify splitting packages because clients can be updated incrementally, which is crucial for large-scale refactoring.\r\n\r\n**Motivation**\r\nDuring refactoring, it is often desirable to split an existing package into multiple packages. Exported objects such as types, functions, etc. that move from one package to another will require clients to be updated accordingly. In a continuous build environment, build breakages are the consequence if not all clients can be updated simultaneously.\r\n\r\nThis is a real issue in large-scale systems such as we find at Google and other companies because the number of dependencies can grow into the hundreds if not thousands. Client packages may be under control of different teams and evolve at different speeds. Updating a large number of client packages simultaneously may be close to impossible. This is an effective barrier to system evolution and maintenance.\r\n\r\nGo trivially permits constants to refer to other constants, possibly from another package. Similarly, if a function moves from one package to another, a “forwarder” function that simply calls the moved function may be left behind so clients can continue to refer to the old package. These techniques enable incremental update of clients without breaking a continuous build system.\r\n\r\nNo such work-around exists for types and variables. To address the issue, we propose the notion of a general alias declaration. An alias declaration introduces an alternative name for an object (constant, type, variable, or function) declared elsewhere, possibly in another package. An alias may be exported, so clients can refer to on object via the package that declares the object, or any package exporting an alias to an object, and get the same object.\r\n\r\nAlias declarations are designed such that they fit seamlessly in the existing language spec without invalidating backward-compatibility or any other aspect of the Go 1 guarantees. Tools that process Go code which will require changes to support alias declarations.\r\n\r\nAlias declarations are a compile-time mechanism and don’t incur any runtime costs.\r\n\r\nThe design document (forthcoming) describes alias declarations in detail.\r\n\r\nAdded July 25, 2016: Link to design document: https://github.com/golang/proposal/blob/master/design/16339-alias-decls.md"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/236378761","html_url":"https://github.com/golang/go/issues/16339#issuecomment-236378761","issue_url":"https://api.github.com/repos/golang/go/issues/16339","id":236378761,"user":{"login":"dlsniper","id":607868,"avatar_url":"https://avatars.githubusercontent.com/u/607868?v=3","gravatar_id":"","url":"https://api.github.com/users/dlsniper","html_url":"https://github.com/dlsniper","followers_url":"https://api.github.com/users/dlsniper/followers","following_url":"https://api.github.com/users/dlsniper/following{/other_user}","gists_url":"https://api.github.com/users/dlsniper/gists{/gist_id}","starred_url":"https://api.github.com/users/dlsniper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlsniper/subscriptions","organizations_url":"https://api.github.com/users/dlsniper/orgs","repos_url":"https://api.github.com/users/dlsniper/repos","events_url":"https://api.github.com/users/dlsniper/events{/privacy}","received_events_url":"https://api.github.com/users/dlsniper/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T17:43:02Z","updated_at":"2016-07-30T17:43:02Z","body":"@DocMerlin the language does not need SemVer support as evidence by the ongoing package management / vendor support. We need however for gophers to tag their releases / packages so that everything else can be used / created (the chicken and egg problem)."}}
{"actor":{"display_login":"dlsniper"}}