{"action":"created","issue":{"url":"https://api.github.com/repos/oridb/mc/issues/104","repository_url":"https://api.github.com/repos/oridb/mc","labels_url":"https://api.github.com/repos/oridb/mc/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/oridb/mc/issues/104/comments","events_url":"https://api.github.com/repos/oridb/mc/issues/104/events","html_url":"https://github.com/oridb/mc/issues/104","id":138848474,"number":104,"title":"implement tuple accessors","user":{"login":"andrewchambers","id":962885,"avatar_url":"https://avatars0.githubusercontent.com/u/962885?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewchambers","html_url":"https://github.com/andrewchambers","followers_url":"https://api.github.com/users/andrewchambers/followers","following_url":"https://api.github.com/users/andrewchambers/following{/other_user}","gists_url":"https://api.github.com/users/andrewchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewchambers/subscriptions","organizations_url":"https://api.github.com/users/andrewchambers/orgs","repos_url":"https://api.github.com/users/andrewchambers/repos","events_url":"https://api.github.com/users/andrewchambers/events{/privacy}","received_events_url":"https://api.github.com/users/andrewchambers/received_events","type":"User","site_admin":false},"labels":[{"id":76404778,"url":"https://api.github.com/repos/oridb/mc/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-06T23:09:19Z","updated_at":"2018-01-01T07:18:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently the only way to access a specific element in a tuple is via match statements or destructuring assignment. Match introduces nesting, and destructuring assignment requires a named variable. In select cases directly accessing tuple values increases code quality.\n\nI can try implement this myself, the feature isn't really urgent so I made this issue so progress can be noted somewhere.\n\nProposed syntax:\n\n```\nvar tup = (1, \"b\")\nstd.put(\"{}\\n\", tup.0) // prints the 1\n```\n\nwhere the 0 after the . must be a positive int literal.\n"},"comment":{"url":"https://api.github.com/repos/oridb/mc/issues/comments/354640131","html_url":"https://github.com/oridb/mc/issues/104#issuecomment-354640131","issue_url":"https://api.github.com/repos/oridb/mc/issues/104","id":354640131,"user":{"login":"oridb","id":5384580,"avatar_url":"https://avatars2.githubusercontent.com/u/5384580?v=4","gravatar_id":"","url":"https://api.github.com/users/oridb","html_url":"https://github.com/oridb","followers_url":"https://api.github.com/users/oridb/followers","following_url":"https://api.github.com/users/oridb/following{/other_user}","gists_url":"https://api.github.com/users/oridb/gists{/gist_id}","starred_url":"https://api.github.com/users/oridb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oridb/subscriptions","organizations_url":"https://api.github.com/users/oridb/orgs","repos_url":"https://api.github.com/users/oridb/repos","events_url":"https://api.github.com/users/oridb/events{/privacy}","received_events_url":"https://api.github.com/users/oridb/received_events","type":"User","site_admin":false},"created_at":"2018-01-01T07:18:09Z","updated_at":"2018-01-01T07:18:09Z","author_association":"OWNER","body":"So, let's take a step back. What problem are you trying to solve in your program? Can you show me some code you had to write, and the way you would have preferred to write it?On Dec 31, 2017 22:11, Sam Stuewe <notifications@github.com> wrote:Well, if we go with the thought of returning a union of the types that the index could possibly result in, wouldn't that solve the issue relatively well? Myr, from what I've seen/read already has pretty reasonable support for tagged unions.\r\n\r\n—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread."}}
{"actor":{"display_login":"oridb"}}