{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/phobos/issues/4287","repository_url":"https://api.github.com/repos/dlang/phobos","labels_url":"https://api.github.com/repos/dlang/phobos/issues/4287/labels{/name}","comments_url":"https://api.github.com/repos/dlang/phobos/issues/4287/comments","events_url":"https://api.github.com/repos/dlang/phobos/issues/4287/events","html_url":"https://github.com/dlang/phobos/pull/4287","id":153603250,"number":4287,"title":"std.traits: hasFunctionAttributes","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dlang/phobos/labels/Enhancement","name":"Enhancement","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-05-07T16:29:43Z","updated_at":"2016-08-28T16:21:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dlang/phobos/pulls/4287","html_url":"https://github.com/dlang/phobos/pull/4287","diff_url":"https://github.com/dlang/phobos/pull/4287.diff","patch_url":"https://github.com/dlang/phobos/pull/4287.patch"},"body":"As discussed in #4274 the std.traits API for querying after function attributes is not very user-friendly.\r\n\r\n```\r\nfunctionAttributes!((int a) { }) == (FunctionAttributes.pure_ | FunctionAttributes.nothrow_ | FunctionAttributes.nogc | FunctionAttributes.safe\r\n```\r\n\r\nwouldn't it be nicer, if we have a dedicated function for this?\r\n\r\n```\r\nhasFunctionAttributes!((int a) { }, \"pure\", \"nothrow\", \"@nogc\", \"@safe\"); \r\n```\r\n\r\nImho this makes it a lot more intuitive for the user to read and easier for us to maintain.\r\nI heard about a DIP to cleanup and unify function attributes, so having a function allows us to stay flexible for the future ;-)\r\nBtw the `trait` `getFunctionAttributes` already returns a string tuple.\r\n\r\nPing @ntrel"},"comment":{"url":"https://api.github.com/repos/dlang/phobos/issues/comments/242983596","html_url":"https://github.com/dlang/phobos/pull/4287#issuecomment-242983596","issue_url":"https://api.github.com/repos/dlang/phobos/issues/4287","id":242983596,"user":{"login":"9il","id":845083,"avatar_url":"https://avatars.githubusercontent.com/u/845083?v=3","gravatar_id":"","url":"https://api.github.com/users/9il","html_url":"https://github.com/9il","followers_url":"https://api.github.com/users/9il/followers","following_url":"https://api.github.com/users/9il/following{/other_user}","gists_url":"https://api.github.com/users/9il/gists{/gist_id}","starred_url":"https://api.github.com/users/9il/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9il/subscriptions","organizations_url":"https://api.github.com/users/9il/orgs","repos_url":"https://api.github.com/users/9il/repos","events_url":"https://api.github.com/users/9il/events{/privacy}","received_events_url":"https://api.github.com/users/9il/received_events","type":"User","site_admin":false},"created_at":"2016-08-28T16:21:28Z","updated_at":"2016-08-28T16:21:28Z","body":"> @9il could you please point out why you marked this as \"needs work\"? I don't see what is blocking on my side & it has already been preapproved.\r\n\r\nauto tester is failing"}}
{"actor":{"display_login":"9il"}}