{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/9870","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/9870/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/9870/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/9870/events","html_url":"https://github.com/JuliaLang/julia/issues/9870","id":55033088,"number":9870,"title":"Variadic (or \"Varargs\") destructuring of tuples","user":{"login":"lilinjn","id":1161604,"avatar_url":"https://avatars.githubusercontent.com/u/1161604?v=3","gravatar_id":"","url":"https://api.github.com/users/lilinjn","html_url":"https://github.com/lilinjn","followers_url":"https://api.github.com/users/lilinjn/followers","following_url":"https://api.github.com/users/lilinjn/following{/other_user}","gists_url":"https://api.github.com/users/lilinjn/gists{/gist_id}","starred_url":"https://api.github.com/users/lilinjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilinjn/subscriptions","organizations_url":"https://api.github.com/users/lilinjn/orgs","repos_url":"https://api.github.com/users/lilinjn/repos","events_url":"https://api.github.com/users/lilinjn/events{/privacy}","received_events_url":"https://api.github.com/users/lilinjn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/feature","name":"feature","color":"02e10c"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/speculative","name":"speculative","color":"999999"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-01-21T15:27:43Z","updated_at":"2015-01-21T20:20:00Z","closed_at":null,"body":"In julia, is there some syntax similar to \r\n`(x,z...) = (1,2,3)` which would result in\r\n`x=1` & `z=(2,3)`?  \r\n\r\nIf not, are there reasons why this was not supported, or perhaps this could be a reasonable feature request (or, more constructively, prior to working on a PR, do others have thoughts about this)?\r\n\r\nIdeally, since nested destructuring e.g. `(a,(b,c)) = (1,(2,3))` works as expected, any variadic version would also work e.g.\r\n`(a,(b,c,d...),e...) = (1,(2,3,4,5),6,7)` would yield \r\n\r\n    a=1\r\n    b=2\r\n    c=3\r\n    d=(4,5)\r\n    e=(6,7)\r\n\r\nAnd perhaps\r\n\r\n`(a,(b,c,d...),e..., nexttolast, last) = (1,(2,3,4,5),6,7,8,9,10)` would yield\r\n\r\n    a=1\r\n    b=2\r\n    c=3\r\n    d=(4,5)\r\n    e=(6,7,8)\r\n    nexttolast=9\r\n    last=10\r\n\r\nWhile `(a,(b,c,d...),e..., nexttolast, last) = (1,(2,3,4,5),9,10)` would yield\r\n  \r\n    a=1\r\n    b=2\r\n    c=3\r\n    d=(4,5)\r\n    e=()\r\n    nexttolast=9\r\n    last=10\r\n\r\nAnd finally `(a,(b,c,d...),e..., nexttolast, last) = (1,(2,3,4,5),10)` would result in an error, just \r\nlike the current behavior for `(a,b) = 1`\r\n "},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/70913699","html_url":"https://github.com/JuliaLang/julia/issues/9870#issuecomment-70913699","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/9870","id":70913699,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","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},"created_at":"2015-01-21T20:20:00Z","updated_at":"2015-01-21T20:20:00Z","body":"See? I knew it was a good idea."}}