{"action":"created","issue":{"url":"https://api.github.com/repos/keean/zenscript/issues/8","repository_url":"https://api.github.com/repos/keean/zenscript","labels_url":"https://api.github.com/repos/keean/zenscript/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/keean/zenscript/issues/8/comments","events_url":"https://api.github.com/repos/keean/zenscript/issues/8/events","html_url":"https://github.com/keean/zenscript/issues/8","id":178442049,"number":8,"title":"Subtyping","user":{"login":"shelby3","id":247731,"avatar_url":"https://avatars.githubusercontent.com/u/247731?v=3","gravatar_id":"","url":"https://api.github.com/users/shelby3","html_url":"https://github.com/shelby3","followers_url":"https://api.github.com/users/shelby3/followers","following_url":"https://api.github.com/users/shelby3/following{/other_user}","gists_url":"https://api.github.com/users/shelby3/gists{/gist_id}","starred_url":"https://api.github.com/users/shelby3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shelby3/subscriptions","organizations_url":"https://api.github.com/users/shelby3/orgs","repos_url":"https://api.github.com/users/shelby3/repos","events_url":"https://api.github.com/users/shelby3/events{/privacy}","received_events_url":"https://api.github.com/users/shelby3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/keean/zenscript/labels/Future%20Work","name":"Future Work","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":263,"created_at":"2016-09-21T19:34:08Z","updated_at":"2016-10-14T07:59:04Z","closed_at":"2016-10-04T17:05:24Z","body":"Union types express a subtyping relationship, but I am unclear as to whether typeclasses (i.e. Rust's traits) do?\r\n\r\nIf a `trait B` extends another `trait A` and `B` reuses the implementations of `A`, can we assign a trait object that has a bound `B` to a trait object that has a bound `A`?\r\n\r\nSeems the answer based on prior discussion is yes. But that is a subtyping relationship, which means we would need to deal with covariance on type parameters both when they are trait objects and when they are unions. Correct?\r\n\r\nPrior discussion:\r\nhttps://github.com/keean/zenscript/issues/6#issuecomment-248711828\r\nhttps://github.com/keean/zenscript/issues/1#issuecomment-248113585\r\nhttps://github.com/keean/traitscript/issues/2#issuecomment-248021713\r\nhttps://github.com/keean/zenscript/issues/1#issuecomment-248754649"},"comment":{"url":"https://api.github.com/repos/keean/zenscript/issues/comments/253734423","html_url":"https://github.com/keean/zenscript/issues/8#issuecomment-253734423","issue_url":"https://api.github.com/repos/keean/zenscript/issues/8","id":253734423,"user":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T07:59:04Z","updated_at":"2016-10-14T07:59:04Z","body":"By \"inheritance\" I mean forming a new schema by taking the union of the members of one or more existing schemas. That's what inheritance means at the level of types. It's what your intersection operation seems to do."}}
{"actor":{"display_login":"gavinking"}}