{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/15032","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/15032/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/15032/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/15032/events","html_url":"https://github.com/JuliaLang/julia/pull/15032","id":133107578,"number":15032,"title":"WIP: implement f.(args...) as a synonym for broadcast(f, args...)","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":54,"created_at":"2016-02-11T22:44:03Z","updated_at":"2016-02-15T21:25:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/15032","html_url":"https://github.com/JuliaLang/julia/pull/15032","diff_url":"https://github.com/JuliaLang/julia/pull/15032.diff","patch_url":"https://github.com/JuliaLang/julia/pull/15032.patch"},"body":"As discussed in #8450, this implements `f.(args...)` as a synonym for ~~`map(f, args...)`~~ `broadcast(f, args...)`.\r\n\r\n(I think we need some \"vectorized-function\" syntax like this even if we *also* have some `f(x) over x` \r\nsyntax for `map` in the future.  People in scientific computing are just too used to vectorized functions to give that up completely.)\r\n\r\nAlso, this PR supports `f.:x` as a synonym for `getfield(f, :x)`, so that one no longer needs to do `f.(:x)`.  For example, it was common to use `Base.(:+)` and similar, and this can now be written `Base.:+`.  For backwards compatibility, we can also support the former syntax via a deprecated `map(m::Module, s::Symbol) = getfield(m, s)` method.\r\n\r\nIt seems to mostly work, but there are a few wrinkles to iron out, and no documentation.   I wanted to post a prototype first to see what people think."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/184402433","html_url":"https://github.com/JuliaLang/julia/pull/15032#issuecomment-184402433","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/15032","id":184402433,"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},"created_at":"2016-02-15T21:25:15Z","updated_at":"2016-02-15T21:25:15Z","body":"`.sin(x)` seems workable to me too, though it would be helpful to have an implementation of it to see what implications it has for the parser.  An expression like `x.*.sin(x)` looks a bit harder to read than `x.*sin.(x)`, however."}}