{"action":"created","issue":{"url":"https://api.github.com/repos/Hejsil/zig-clap/issues/8","repository_url":"https://api.github.com/repos/Hejsil/zig-clap","labels_url":"https://api.github.com/repos/Hejsil/zig-clap/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Hejsil/zig-clap/issues/8/comments","events_url":"https://api.github.com/repos/Hejsil/zig-clap/issues/8/events","html_url":"https://github.com/Hejsil/zig-clap/issues/8","id":314614961,"number":8,"title":"A Zig'y way of constructing the clap","user":{"login":"Hejsil","id":3759175,"avatar_url":"https://avatars3.githubusercontent.com/u/3759175?v=4","gravatar_id":"","url":"https://api.github.com/users/Hejsil","html_url":"https://github.com/Hejsil","followers_url":"https://api.github.com/users/Hejsil/followers","following_url":"https://api.github.com/users/Hejsil/following{/other_user}","gists_url":"https://api.github.com/users/Hejsil/gists{/gist_id}","starred_url":"https://api.github.com/users/Hejsil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hejsil/subscriptions","organizations_url":"https://api.github.com/users/Hejsil/orgs","repos_url":"https://api.github.com/users/Hejsil/repos","events_url":"https://api.github.com/users/Hejsil/events{/privacy}","received_events_url":"https://api.github.com/users/Hejsil/received_events","type":"User","site_admin":false},"labels":[{"id":867009504,"url":"https://api.github.com/repos/Hejsil/zig-clap/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-16T11:45:15Z","updated_at":"2018-04-16T15:12:53Z","closed_at":null,"author_association":"OWNER","body":"> I don't think the java 'builder' way of doing things is really 'Zig'y, and I prefer the syntax way of the current arg.zig which honestly looks very nice; \r\n\r\nNow, I'm not aware of what exactly he means by not 'Zig'y, but I have my own problems with the Builder pattern I'm using:\r\n* The indent level explodes quite fast with my current coding style.\r\n* `zig fmt` will ruine code written this way.\r\n* The builders them self are around 30% of the code in `clap.zig`\r\n* All the `.build()` at the end are ugly, and I don't like them.\r\n\r\nWe need a way to constructs arguments, which allows for the following:\r\n* Allows for optional, and required \"arguments\" to the construction of options.\r\n  * I require that the user specifies the field, which an argument is mapped to, but the rest, I provide sensible defaults for, which can be overwritten if the user wants (This is the strength of the Builder Pattern)\r\n* Unlike `arg.zig` in the self hosted parser, arguments can have be long, short or both.\r\n  * The reason we destinguish is to allow short arguments to chain: `-abcd`\r\n\r\n@BraedonWooding I'd love to hear what you think. Any idea of a better way?"},"comment":{"url":"https://api.github.com/repos/Hejsil/zig-clap/issues/comments/381640068","html_url":"https://github.com/Hejsil/zig-clap/issues/8#issuecomment-381640068","issue_url":"https://api.github.com/repos/Hejsil/zig-clap/issues/8","id":381640068,"user":{"login":"Hejsil","id":3759175,"avatar_url":"https://avatars3.githubusercontent.com/u/3759175?v=4","gravatar_id":"","url":"https://api.github.com/users/Hejsil","html_url":"https://github.com/Hejsil","followers_url":"https://api.github.com/users/Hejsil/followers","following_url":"https://api.github.com/users/Hejsil/following{/other_user}","gists_url":"https://api.github.com/users/Hejsil/gists{/gist_id}","starred_url":"https://api.github.com/users/Hejsil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hejsil/subscriptions","organizations_url":"https://api.github.com/users/Hejsil/orgs","repos_url":"https://api.github.com/users/Hejsil/repos","events_url":"https://api.github.com/users/Hejsil/events{/privacy}","received_events_url":"https://api.github.com/users/Hejsil/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T15:12:52Z","updated_at":"2018-04-16T15:12:52Z","author_association":"OWNER","body":"@andrewrk I like the idea of tags, but that only makes @BraedonWooding proposal nicer and doesn't solve this \"I can't edit this struct, because it's part of a lib\" problem :)"}}
{"actor":{"display_login":"Hejsil"}}