{"action":"created","issue":{"url":"https://api.github.com/repos/ark-lang/ark/issues/564","labels_url":"https://api.github.com/repos/ark-lang/ark/issues/564/labels{/name}","comments_url":"https://api.github.com/repos/ark-lang/ark/issues/564/comments","events_url":"https://api.github.com/repos/ark-lang/ark/issues/564/events","html_url":"https://github.com/ark-lang/ark/issues/564","id":97314121,"number":564,"title":"Named types implementation","user":{"login":"felixangell","id":6254332,"avatar_url":"https://avatars.githubusercontent.com/u/6254332?v=3","gravatar_id":"","url":"https://api.github.com/users/felixangell","html_url":"https://github.com/felixangell","followers_url":"https://api.github.com/users/felixangell/followers","following_url":"https://api.github.com/users/felixangell/following{/other_user}","gists_url":"https://api.github.com/users/felixangell/gists{/gist_id}","starred_url":"https://api.github.com/users/felixangell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixangell/subscriptions","organizations_url":"https://api.github.com/users/felixangell/orgs","repos_url":"https://api.github.com/users/felixangell/repos","events_url":"https://api.github.com/users/felixangell/events{/privacy}","received_events_url":"https://api.github.com/users/felixangell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ark-lang/ark/labels/E-hard","name":"E-hard","color":"bfe5bf"},{"url":"https://api.github.com/repos/ark-lang/ark/labels/P-High","name":"P-High","color":"c7def8"},{"url":"https://api.github.com/repos/ark-lang/ark/labels/S-parser","name":"S-parser","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"MovingtoMars","id":596124,"avatar_url":"https://avatars.githubusercontent.com/u/596124?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingtoMars","html_url":"https://github.com/MovingtoMars","followers_url":"https://api.github.com/users/MovingtoMars/followers","following_url":"https://api.github.com/users/MovingtoMars/following{/other_user}","gists_url":"https://api.github.com/users/MovingtoMars/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingtoMars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingtoMars/subscriptions","organizations_url":"https://api.github.com/users/MovingtoMars/orgs","repos_url":"https://api.github.com/users/MovingtoMars/repos","events_url":"https://api.github.com/users/MovingtoMars/events{/privacy}","received_events_url":"https://api.github.com/users/MovingtoMars/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-07-26T12:52:26Z","updated_at":"2015-07-28T08:24:09Z","closed_at":null,"body":"check out [rfc #7](https://github.com/ark-lang/ark-rfcs/issues/7)\r\n\r\n```tfw-no-ebnf-highlighting\r\nnamed_type = \"type\" Iden Type \";\";\r\n```\r\n\r\nA named type is specified by the type keyword, followed by a name and a type declaration, note that this should be terminated with a semi-colon, which includes declarations like structures and enums.\r\n\r\n```go\r\ntype PersonID s32;\r\n\r\ntype Person struct {\r\n     x: PersonID,\r\n};\r\n\r\ntype PersonGender enum {\r\n     Male,\r\n     Female\r\n};\r\n\r\n// lol\r\ntype Adventurous trait {\r\n     \r\n};\r\n```\r\n\r\nThis will also allow for anonymous enums and structures:\r\n```go\r\nstruct {\r\n     x: s32,\r\n     y: s32,\r\n} // no semi-colon.\r\n\r\nenum {\r\n     BUTTERFLY_DOOR,\r\n     SUICIDE_DOOR,\r\n     GULLWING_DOOR,\r\n     SCISSOR_DOOR,\r\n} // no semi-colon.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ark-lang/ark/issues/comments/125498370","html_url":"https://github.com/ark-lang/ark/issues/564#issuecomment-125498370","issue_url":"https://api.github.com/repos/ark-lang/ark/issues/564","id":125498370,"user":{"login":"MovingtoMars","id":596124,"avatar_url":"https://avatars.githubusercontent.com/u/596124?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingtoMars","html_url":"https://github.com/MovingtoMars","followers_url":"https://api.github.com/users/MovingtoMars/followers","following_url":"https://api.github.com/users/MovingtoMars/following{/other_user}","gists_url":"https://api.github.com/users/MovingtoMars/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingtoMars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingtoMars/subscriptions","organizations_url":"https://api.github.com/users/MovingtoMars/orgs","repos_url":"https://api.github.com/users/MovingtoMars/repos","events_url":"https://api.github.com/users/MovingtoMars/events{/privacy}","received_events_url":"https://api.github.com/users/MovingtoMars/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T08:24:09Z","updated_at":"2015-07-28T08:24:09Z","body":"Comparison will work like this:\r\n\r\n## Comparison\r\nTwo types can be matched if one of these conditions are met:\r\n- one type is anonymous and both have matching layouts\r\n- both types are anonymous and both have matching layouts\r\n- both are the same type, from the same type definition"}}