{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1346","repository_url":"https://api.github.com/repos/Microsoft/visualfsharp","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1346/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1346/comments","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1346/events","html_url":"https://github.com/Microsoft/visualfsharp/issues/1346","id":165308592,"number":1346,"title":"Discussion: Do we *really* need a warning when creating Disposables?","user":{"login":"isaacabraham","id":1781813,"avatar_url":"https://avatars.githubusercontent.com/u/1781813?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacabraham","html_url":"https://github.com/isaacabraham","followers_url":"https://api.github.com/users/isaacabraham/followers","following_url":"https://api.github.com/users/isaacabraham/following{/other_user}","gists_url":"https://api.github.com/users/isaacabraham/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacabraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacabraham/subscriptions","organizations_url":"https://api.github.com/users/isaacabraham/orgs","repos_url":"https://api.github.com/users/isaacabraham/repos","events_url":"https://api.github.com/users/isaacabraham/events{/privacy}","received_events_url":"https://api.github.com/users/isaacabraham/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/discussion","name":"discussion","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-07-13T12:29:46Z","updated_at":"2016-07-15T19:37:26Z","closed_at":"2016-07-15T19:37:26Z","body":"The only time I ever use the new keyword is on Disposables, and even then only to silence the compiler warnings. I'm not sure what purpose the warning serves either, because you can still forget to bind the disposable with the ``use`` keyword instead of with ``let``. What's more annoying is that it prevents you from effective pipelining: -\r\n\r\n```fsharp\r\nuse stream = \"myfile.txt\" |> File.OpenRead |> StreamReader\r\n```\r\n\r\nThis code leads to a warning - why? And, could this be removed from the next F# release (or perhaps replaced with a warning if you bind a Disposable with ``let`` instead of ``use``)?"}}
{"actor":{"display_login":"isaacabraham"}}