{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/675","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/675/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/675/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/675/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/675","id":176947853,"number":675,"title":"Investigate support for return value bindings","user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-14T15:59:47Z","updated_at":"2016-09-14T17:10:19Z","closed_at":null,"body":"Investigate whether we can simplify function signatures in cases where there is only a single ouput binding. Currently we require an output parameter. In such cases, it would be more natural to simply map the single output binding to the **return value** of the function.\r\n\r\nNote that we already support this as a special case for HttpTrigger. We should investigate whether we can generalize that. In function.json since return values aren't named in function signatures, we'd have to use a special name like \"$return\" or something. We also need to think through what this means for script languages like BAT where there is no \"return value\" for the function.\r\n\r\nThis would require core SDK changes to support return value attribute binding. E.g.:\r\n\r\n```csharp\r\n[return: Blob(\"test\", FileAccess.Write)]\r\npublic static string Test(\r\n    [QueueTrigger(\"test\")] string message)\r\n{\r\n    return \"Testing\";\r\n}\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments/247085198","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/675#issuecomment-247085198","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/675","id":247085198,"user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T17:10:19Z","updated_at":"2016-09-14T17:10:19Z","body":"Yay!  Mapping the output parameter to the output of the actual function would be amazing.  That would allow for more idiomatic F# as well.\r\n\r\nSomething like this:\r\n\r\n```fsharp\r\ntype Item = { Id: string }\r\n\r\n// Eeek, byrefs!\r\nlet Run(blob: string, output: byref<Item>) =\r\n    let item = { Id = \"Some ID\" }\r\n    output <- item\r\n```\r\n\r\nCould then turn into this:\r\n\r\n```fsharp\r\ntype Item = { Id: string }\r\n\r\n// Hooray!  The return value is just what returns from the Azure Function!\r\nlet Run (blob: string) =\r\n    { Id = \"Some ID\" }\r\n```\r\n\r\nOr, if explicit typing is needed:\r\n\r\n```fsharp\r\ntype Item = { Id: string }\r\n\r\nlet Run (blob: string): Item =\r\n    { Id = \"Some ID\" }\r\n```"}}
{"actor":{"display_login":"cartermp"}}