{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/72737314","id":72737314,"diff_hunk":"@@ -10,6 +10,11 @@ export broadcast_getindex, broadcast_setindex!\n \n ## Broadcasting utilities ##\n \n+# fallback routines for broadcasting with no arguments or with scalars\n+# to just produce a scalar result:\n+broadcast(f) = f()\n+broadcast(f, x::Number...) = f(x...)","path":"base/broadcast.jl","position":7,"original_position":7,"commit_id":"33f36b4d0d6aeff6bcc1be0452402853b7fe662b","original_commit_id":"33f36b4d0d6aeff6bcc1be0452402853b7fe662b","user":{"login":"tkelman","id":5934628,"avatar_url":"https://avatars.githubusercontent.com/u/5934628?v=3","gravatar_id":"","url":"https://api.github.com/users/tkelman","html_url":"https://github.com/tkelman","followers_url":"https://api.github.com/users/tkelman/followers","following_url":"https://api.github.com/users/tkelman/following{/other_user}","gists_url":"https://api.github.com/users/tkelman/gists{/gist_id}","starred_url":"https://api.github.com/users/tkelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkelman/subscriptions","organizations_url":"https://api.github.com/users/tkelman/orgs","repos_url":"https://api.github.com/users/tkelman/repos","events_url":"https://api.github.com/users/tkelman/events{/privacy}","received_events_url":"https://api.github.com/users/tkelman/received_events","type":"User","site_admin":false},"body":"I think this is ambiguous with https://github.com/JuliaLang/julia/blob/2b98dda496760466a07225ae5ef0341aafbbaec8/base/deprecated.jl#L370 (but not detected? cc @timholy) and causes, for example `speye(5).(2)` to not trigger the deprecation `getfield` path that it would have meant on 0.4, but instead trigger a `MethodError: objects of type SparseMatrixCSC{Float64,Int32} are not callable`.","created_at":"2016-07-29T03:20:43Z","updated_at":"2016-07-29T03:20:43Z","html_url":"https://github.com/JuliaLang/julia/pull/17318#discussion_r72737314","pull_request_url":"https://api.github.com/repos/JuliaLang/julia/pulls/17318","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/72737314"},"html":{"href":"https://github.com/JuliaLang/julia/pull/17318#discussion_r72737314"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/17318"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/17318","id":76609458,"html_url":"https://github.com/JuliaLang/julia/pull/17318","diff_url":"https://github.com/JuliaLang/julia/pull/17318.diff","patch_url":"https://github.com/JuliaLang/julia/pull/17318.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/17318","number":17318,"state":"closed","locked":false,"title":"broadcasting over scalars should produce a scalar","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"body":"This changes `f.(numbers...)` to be equivalent to `f(numbers...)`.  Rationale:\r\n\r\n* It is a longstanding convention that \"dot\" operators like `.^` are equivalent to the \"non-dot\" operator when acting on scalars, and we need to preserve this behavior if we want to change dot operators to use `broadcast` as per #16285.\r\n* It makes it easier to write generic code that works equally well for vectors and scalars.\r\n* `map(f, numbers...)` already returned `f(numbers...)`, and it is odd for `broadcast` to be different.\r\n\r\nAlso, I made the empty-argument case `f.()` or `map(f)` return `f()`, for much the same reasons.  (Previously, this threw an exception for both `map` and `broadcast`.) *Update:* This also will give more consistent behavior for inlining literals in `f.(args...)` broadcast syntax (see below).","created_at":"2016-07-07T14:54:11Z","updated_at":"2016-07-29T03:20:43Z","closed_at":"2016-07-11T19:23:10Z","merged_at":"2016-07-11T19:23:10Z","merge_commit_sha":"0822970cef68ab3316d3d4cf53df58485d72c0bd","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/14","html_url":"https://github.com/JuliaLang/julia/milestones/0.5.0","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/14/labels","id":868319,"number":14,"title":"0.5.0","description":"Release-defining items for v0.5.","creator":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars.githubusercontent.com/u/330950?v=3","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},"open_issues":3,"closed_issues":106,"state":"open","created_at":"2014-11-16T16:16:12Z","updated_at":"2016-07-28T23:41:01Z","due_on":"2016-07-31T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/17318/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/17318/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/17318/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/33f36b4d0d6aeff6bcc1be0452402853b7fe662b","head":{"label":"stevengj:bcast_scalar","ref":"bcast_scalar","sha":"33f36b4d0d6aeff6bcc1be0452402853b7fe662b","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"repo":{"id":7264997,"name":"julia","full_name":"stevengj/julia","owner":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevengj/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":true,"url":"https://api.github.com/repos/stevengj/julia","forks_url":"https://api.github.com/repos/stevengj/julia/forks","keys_url":"https://api.github.com/repos/stevengj/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevengj/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevengj/julia/teams","hooks_url":"https://api.github.com/repos/stevengj/julia/hooks","issue_events_url":"https://api.github.com/repos/stevengj/julia/issues/events{/number}","events_url":"https://api.github.com/repos/stevengj/julia/events","assignees_url":"https://api.github.com/repos/stevengj/julia/assignees{/user}","branches_url":"https://api.github.com/repos/stevengj/julia/branches{/branch}","tags_url":"https://api.github.com/repos/stevengj/julia/tags","blobs_url":"https://api.github.com/repos/stevengj/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevengj/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevengj/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevengj/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevengj/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/stevengj/julia/languages","stargazers_url":"https://api.github.com/repos/stevengj/julia/stargazers","contributors_url":"https://api.github.com/repos/stevengj/julia/contributors","subscribers_url":"https://api.github.com/repos/stevengj/julia/subscribers","subscription_url":"https://api.github.com/repos/stevengj/julia/subscription","commits_url":"https://api.github.com/repos/stevengj/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevengj/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevengj/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevengj/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevengj/julia/contents/{+path}","compare_url":"https://api.github.com/repos/stevengj/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevengj/julia/merges","archive_url":"https://api.github.com/repos/stevengj/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevengj/julia/downloads","issues_url":"https://api.github.com/repos/stevengj/julia/issues{/number}","pulls_url":"https://api.github.com/repos/stevengj/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/stevengj/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/stevengj/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevengj/julia/labels{/name}","releases_url":"https://api.github.com/repos/stevengj/julia/releases{/id}","deployments_url":"https://api.github.com/repos/stevengj/julia/deployments","created_at":"2012-12-20T21:59:35Z","updated_at":"2015-11-06T22:23:44Z","pushed_at":"2016-07-27T16:08:52Z","git_url":"git://github.com/stevengj/julia.git","ssh_url":"git@github.com:stevengj/julia.git","clone_url":"https://github.com/stevengj/julia.git","svn_url":"https://github.com/stevengj/julia","homepage":"http://julialang.org/","size":88355,"stargazers_count":0,"watchers_count":0,"language":"Julia","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":"JuliaLang:master","ref":"master","sha":"5331948007732fafb2fa2ed3aa9bf0335d3e8586","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaLang/julia/deployments","created_at":"2011-04-21T07:01:50Z","updated_at":"2016-07-29T01:04:16Z","pushed_at":"2016-07-29T03:20:29Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":408087,"stargazers_count":7299,"watchers_count":7299,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1695,"mirror_url":null,"open_issues_count":1858,"forks":1695,"open_issues":1858,"watchers":7299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/17318"},"html":{"href":"https://github.com/JuliaLang/julia/pull/17318"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/17318"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/17318/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/17318/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/17318/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/33f36b4d0d6aeff6bcc1be0452402853b7fe662b"}}}}
{"actor":{"display_login":"tkelman"}}