{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/414","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/414/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/414/events","html_url":"https://github.com/JuliaLang/julia/issues/414","id":3295385,"number":414,"title":"Pure function notation","user":{"login":"si14","id":316910,"avatar_url":"https://avatars.githubusercontent.com/u/316910?v=3","gravatar_id":"","url":"https://api.github.com/users/si14","html_url":"https://github.com/si14","followers_url":"https://api.github.com/users/si14/followers","following_url":"https://api.github.com/users/si14/following{/other_user}","gists_url":"https://api.github.com/users/si14/gists{/gist_id}","starred_url":"https://api.github.com/users/si14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/si14/subscriptions","organizations_url":"https://api.github.com/users/si14/orgs","repos_url":"https://api.github.com/users/si14/repos","events_url":"https://api.github.com/users/si14/events{/privacy}","received_events_url":"https://api.github.com/users/si14/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/speculative","name":"speculative","color":"999999"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":45,"created_at":"2012-02-20T14:17:20Z","updated_at":"2015-11-18T12:54:24Z","closed_at":"2015-11-18T06:08:12Z","body":"There are a lot of optimization opportunities coming from the ability to distinguish pure functions from unpure. The most important one (IMO) is deforestation: when you have something like `sum(transpose(transpose(generate_random_matrix(M, N)) * SCALAR))`, you can optimize away an entire matrix construction if you know that `sum` consumes matrix, `generate_random_matrix` builds one and all functions that was applied to generated matrix are pure. So it would be handy to have an ability to say that the particular function is pure."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/157703164","html_url":"https://github.com/JuliaLang/julia/issues/414#issuecomment-157703164","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/414","id":157703164,"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":"2015-11-18T12:54:24Z","updated_at":"2015-11-18T12:54:24Z","body":"@vtjnash, maybe we need a followup issue to track `@pure` optimizations?"}}