{"action":"opened","issue":{"url":"https://api.github.com/repos/TabletopAssistant/DiceKit/issues/35","labels_url":"https://api.github.com/repos/TabletopAssistant/DiceKit/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/TabletopAssistant/DiceKit/issues/35/comments","events_url":"https://api.github.com/repos/TabletopAssistant/DiceKit/issues/35/events","html_url":"https://github.com/TabletopAssistant/DiceKit/issues/35","id":96452119,"number":35,"title":"Add global convenience function to create Die","user":{"login":"brentleyjones","id":158658,"avatar_url":"https://avatars.githubusercontent.com/u/158658?v=3","gravatar_id":"","url":"https://api.github.com/users/brentleyjones","html_url":"https://github.com/brentleyjones","followers_url":"https://api.github.com/users/brentleyjones/followers","following_url":"https://api.github.com/users/brentleyjones/following{/other_user}","gists_url":"https://api.github.com/users/brentleyjones/gists{/gist_id}","starred_url":"https://api.github.com/users/brentleyjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentleyjones/subscriptions","organizations_url":"https://api.github.com/users/brentleyjones/orgs","repos_url":"https://api.github.com/users/brentleyjones/repos","events_url":"https://api.github.com/users/brentleyjones/events{/privacy}","received_events_url":"https://api.github.com/users/brentleyjones/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TabletopAssistant/DiceKit/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T01:24:53Z","updated_at":"2015-07-22T01:24:53Z","closed_at":null,"body":"It's sort of verbose to create dice in long form:\r\n\r\n```swift\r\nlet die = Die(sides: 8)\r\n```\r\n\r\nWith expressions it gets even more unwieldy:\r\n\r\n```swift\r\nlet expression = MultiplicationExpression(2, Die(sides: 20))\r\n```\r\n\r\nWhen #34 is implemented this will be a lot better:\r\n\r\n```swift\r\nlet expression = 2 * Die(sides: 20)\r\n```\r\n\r\nThe final improvement would be to make the die creation better:\r\n\r\n```swift\r\nlet expression = 2 * d(20)\r\n```"}}