{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1036","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1036/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1036/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1036/events","html_url":"https://github.com/rust-lang/rfcs/pull/1036","id":66496740,"number":1036,"title":"Add Builder guidelines","user":{"login":"nagisa","id":679122,"avatar_url":"https://avatars.githubusercontent.com/u/679122?v=3","gravatar_id":"","url":"https://api.github.com/users/nagisa","html_url":"https://github.com/nagisa","followers_url":"https://api.github.com/users/nagisa/followers","following_url":"https://api.github.com/users/nagisa/following{/other_user}","gists_url":"https://api.github.com/users/nagisa/gists{/gist_id}","starred_url":"https://api.github.com/users/nagisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagisa/subscriptions","organizations_url":"https://api.github.com/users/nagisa/orgs","repos_url":"https://api.github.com/users/nagisa/repos","events_url":"https://api.github.com/users/nagisa/events{/privacy}","received_events_url":"https://api.github.com/users/nagisa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-libs","name":"T-libs","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-04-06T00:17:14Z","updated_at":"2015-06-03T22:02:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1036","html_url":"https://github.com/rust-lang/rfcs/pull/1036","diff_url":"https://github.com/rust-lang/rfcs/pull/1036.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1036.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/108628040","html_url":"https://github.com/rust-lang/rfcs/pull/1036#issuecomment-108628040","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1036","id":108628040,"user":{"login":"BurntSushi","id":456674,"avatar_url":"https://avatars.githubusercontent.com/u/456674?v=3","gravatar_id":"","url":"https://api.github.com/users/BurntSushi","html_url":"https://github.com/BurntSushi","followers_url":"https://api.github.com/users/BurntSushi/followers","following_url":"https://api.github.com/users/BurntSushi/following{/other_user}","gists_url":"https://api.github.com/users/BurntSushi/gists{/gist_id}","starred_url":"https://api.github.com/users/BurntSushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurntSushi/subscriptions","organizations_url":"https://api.github.com/users/BurntSushi/orgs","repos_url":"https://api.github.com/users/BurntSushi/repos","events_url":"https://api.github.com/users/BurntSushi/events{/privacy}","received_events_url":"https://api.github.com/users/BurntSushi/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T22:02:34Z","updated_at":"2015-06-03T22:02:34Z","body":"I broadly like this RFC. For reasons that others have mentioned, I would prefer to keep the `Command` name. I do like the idea of replacing `OpenOptions` with `FileBuilder`.\r\n\r\nOne thing I'm confused about is this in the \"alternatives\" section:\r\n\r\n> Construct builders via a method implemented on the buildees. The API looks like this:\r\n\r\nIt seems to me like this could be a legitimate choice when designing builder-like things. I find that the reduction in the number of types to be a big advantage when possible. In particular, putting the builder on the buildee itself has worked well for me when there are a lot of optional parameters. e.g.,\r\n\r\n```rust\r\nlet mut rdr = csv::Reader::from_file(\"foo.csv\"); // sane defaults\r\nlet mut rdr = csv::Reader::from_file(\"foo.csv\")\r\n                          .delimiter('\\t');      // tab delimited\r\nlet mut rdr = csv::Reader::from_file(\"foo.csv\")\r\n                          .has_headers(false)\r\n                          .quote('\\'')\r\n                          .delimiter(';')\r\n                          .escape(Some('\\\\'));   // something whacky\r\n\r\n// any of the above `rdr`s can decode records.\r\n```\r\n\r\nIt's true that this pattern can't be used for all things, but I'd find it unfortunate to rule it out just for that reason."}}