{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/48455910","id":48455910,"diff_hunk":"@@ -57,3 +80,33 @@ build_cases([], DoExpr) ->\n   DoExpr;\n build_cases([{_, Meta, _} = Expr | Rest], DoExpr) ->\n   {'__block__', Meta, [Expr, build_cases(Rest, DoExpr)]}.\n+\n+build_else(Meta, WithCases, RefVar, ElseClauses) ->\n+  Result = {'result', Meta, nil},\n+  CatchAllExist = catch_all_exists(ElseClauses),\n+  Clauses = [\n+    {'->', Meta, [[{{'^', Meta, [RefVar]}, Result}], Result]}\n+    | ElseClauses\n+  ] ++ [build_raise(Meta) || not CatchAllExist],\n+  {'case', Meta, [WithCases, [{do, Clauses}]]}.\n+\n+catch_all_exists([{'->', _, [[Match], _]} | ElseClauses]) ->","path":"lib/elixir/src/elixir_with.erl","position":88,"original_position":88,"commit_id":"95c522c62bc3bb7449a7febf6a08f876dece7339","original_commit_id":"95c522c62bc3bb7449a7febf6a08f876dece7339","user":{"login":"lexmag","id":248290,"avatar_url":"https://avatars.githubusercontent.com/u/248290?v=3","gravatar_id":"","url":"https://api.github.com/users/lexmag","html_url":"https://github.com/lexmag","followers_url":"https://api.github.com/users/lexmag/followers","following_url":"https://api.github.com/users/lexmag/following{/other_user}","gists_url":"https://api.github.com/users/lexmag/gists{/gist_id}","starred_url":"https://api.github.com/users/lexmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexmag/subscriptions","organizations_url":"https://api.github.com/users/lexmag/orgs","repos_url":"https://api.github.com/users/lexmag/repos","events_url":"https://api.github.com/users/lexmag/events{/privacy}","received_events_url":"https://api.github.com/users/lexmag/received_events","type":"User","site_admin":false},"body":"I think it would be beneficial to rename `catch_all_exists` (maybe `has_wildcard_clause`?) as it could be confused with `try`'s catch.\r\nFor a second I had that confusion when was reading this https://github.com/elixir-lang/elixir/pull/4114/files#r48451731 comment.","created_at":"2015-12-27T16:01:30Z","updated_at":"2015-12-27T16:01:30Z","html_url":"https://github.com/elixir-lang/elixir/pull/4114#discussion_r48455910","pull_request_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/48455910"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4114#discussion_r48455910"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114","id":54583735,"html_url":"https://github.com/elixir-lang/elixir/pull/4114","diff_url":"https://github.com/elixir-lang/elixir/pull/4114.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/4114.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4114","number":4114,"state":"open","locked":false,"title":"Optional else clauses can be added to special form with","user":{"login":"liveforeverx","id":660306,"avatar_url":"https://avatars.githubusercontent.com/u/660306?v=3","gravatar_id":"","url":"https://api.github.com/users/liveforeverx","html_url":"https://github.com/liveforeverx","followers_url":"https://api.github.com/users/liveforeverx/followers","following_url":"https://api.github.com/users/liveforeverx/following{/other_user}","gists_url":"https://api.github.com/users/liveforeverx/gists{/gist_id}","starred_url":"https://api.github.com/users/liveforeverx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveforeverx/subscriptions","organizations_url":"https://api.github.com/users/liveforeverx/orgs","repos_url":"https://api.github.com/users/liveforeverx/repos","events_url":"https://api.github.com/users/liveforeverx/events{/privacy}","received_events_url":"https://api.github.com/users/liveforeverx/received_events","type":"User","site_admin":false},"body":"Reference: #4085","created_at":"2015-12-25T10:40:05Z","updated_at":"2015-12-27T16:01:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ee534681b46e5eff6a9eb962ba9ad9564582102","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4114/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/95c522c62bc3bb7449a7febf6a08f876dece7339","head":{"label":"liveforeverx:with_else","ref":"with_else","sha":"95c522c62bc3bb7449a7febf6a08f876dece7339","user":{"login":"liveforeverx","id":660306,"avatar_url":"https://avatars.githubusercontent.com/u/660306?v=3","gravatar_id":"","url":"https://api.github.com/users/liveforeverx","html_url":"https://github.com/liveforeverx","followers_url":"https://api.github.com/users/liveforeverx/followers","following_url":"https://api.github.com/users/liveforeverx/following{/other_user}","gists_url":"https://api.github.com/users/liveforeverx/gists{/gist_id}","starred_url":"https://api.github.com/users/liveforeverx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveforeverx/subscriptions","organizations_url":"https://api.github.com/users/liveforeverx/orgs","repos_url":"https://api.github.com/users/liveforeverx/repos","events_url":"https://api.github.com/users/liveforeverx/events{/privacy}","received_events_url":"https://api.github.com/users/liveforeverx/received_events","type":"User","site_admin":false},"repo":{"id":7710197,"name":"elixir","full_name":"liveforeverx/elixir","owner":{"login":"liveforeverx","id":660306,"avatar_url":"https://avatars.githubusercontent.com/u/660306?v=3","gravatar_id":"","url":"https://api.github.com/users/liveforeverx","html_url":"https://github.com/liveforeverx","followers_url":"https://api.github.com/users/liveforeverx/followers","following_url":"https://api.github.com/users/liveforeverx/following{/other_user}","gists_url":"https://api.github.com/users/liveforeverx/gists{/gist_id}","starred_url":"https://api.github.com/users/liveforeverx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveforeverx/subscriptions","organizations_url":"https://api.github.com/users/liveforeverx/orgs","repos_url":"https://api.github.com/users/liveforeverx/repos","events_url":"https://api.github.com/users/liveforeverx/events{/privacy}","received_events_url":"https://api.github.com/users/liveforeverx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liveforeverx/elixir","description":"Elixir is a functional meta-programming aware language built on top of the Erlang VM. It is a dynamic language with flexible syntax with macros support that leverages Erlang's abilities to build concurrent, distributed, fault-tolerant applications with hot code upgrades","fork":true,"url":"https://api.github.com/repos/liveforeverx/elixir","forks_url":"https://api.github.com/repos/liveforeverx/elixir/forks","keys_url":"https://api.github.com/repos/liveforeverx/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liveforeverx/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liveforeverx/elixir/teams","hooks_url":"https://api.github.com/repos/liveforeverx/elixir/hooks","issue_events_url":"https://api.github.com/repos/liveforeverx/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/liveforeverx/elixir/events","assignees_url":"https://api.github.com/repos/liveforeverx/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/liveforeverx/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/liveforeverx/elixir/tags","blobs_url":"https://api.github.com/repos/liveforeverx/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liveforeverx/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liveforeverx/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/liveforeverx/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liveforeverx/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/liveforeverx/elixir/languages","stargazers_url":"https://api.github.com/repos/liveforeverx/elixir/stargazers","contributors_url":"https://api.github.com/repos/liveforeverx/elixir/contributors","subscribers_url":"https://api.github.com/repos/liveforeverx/elixir/subscribers","subscription_url":"https://api.github.com/repos/liveforeverx/elixir/subscription","commits_url":"https://api.github.com/repos/liveforeverx/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/liveforeverx/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/liveforeverx/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/liveforeverx/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/liveforeverx/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/liveforeverx/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liveforeverx/elixir/merges","archive_url":"https://api.github.com/repos/liveforeverx/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liveforeverx/elixir/downloads","issues_url":"https://api.github.com/repos/liveforeverx/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/liveforeverx/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/liveforeverx/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/liveforeverx/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liveforeverx/elixir/labels{/name}","releases_url":"https://api.github.com/repos/liveforeverx/elixir/releases{/id}","created_at":"2013-01-19T23:13:11Z","updated_at":"2015-03-27T22:42:29Z","pushed_at":"2015-12-27T04:30:41Z","git_url":"git://github.com/liveforeverx/elixir.git","ssh_url":"git@github.com:liveforeverx/elixir.git","clone_url":"https://github.com/liveforeverx/elixir.git","svn_url":"https://github.com/liveforeverx/elixir","homepage":"http://elixir-lang.org/","size":32547,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"7354974ef2a18369d06d44b0e369f388205316b4","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","created_at":"2011-01-09T08:43:57Z","updated_at":"2015-12-27T13:54:49Z","pushed_at":"2015-12-27T04:30:41Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":40918,"stargazers_count":5713,"watchers_count":5713,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":793,"mirror_url":null,"open_issues_count":39,"forks":793,"open_issues":39,"watchers":5713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4114"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4114"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4114/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4114/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/95c522c62bc3bb7449a7febf6a08f876dece7339"}}}}