{"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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":125,"created_at":"2016-09-21T19:34:08Z","updated_at":"2016-09-23T18:44:52Z","closed_at":null,"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/249271900","html_url":"https://github.com/keean/zenscript/issues/8#issuecomment-249271900","issue_url":"https://api.github.com/repos/keean/zenscript/issues/8","id":249271900,"user":{"login":"keean","id":508384,"avatar_url":"https://avatars.githubusercontent.com/u/508384?v=3","gravatar_id":"","url":"https://api.github.com/users/keean","html_url":"https://github.com/keean","followers_url":"https://api.github.com/users/keean/followers","following_url":"https://api.github.com/users/keean/following{/other_user}","gists_url":"https://api.github.com/users/keean/gists{/gist_id}","starred_url":"https://api.github.com/users/keean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keean/subscriptions","organizations_url":"https://api.github.com/users/keean/orgs","repos_url":"https://api.github.com/users/keean/repos","events_url":"https://api.github.com/users/keean/events{/privacy}","received_events_url":"https://api.github.com/users/keean/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T18:44:52Z","updated_at":"2016-09-23T18:44:52Z","body":"I can't be wrong, its logic ;-) I can show you the type checking algorithm written in Prolog, how can it be wrong? How does the checking allow an incorrect program to pass type checking?\r\n\r\nIf you just want to disagree over terminology that's fine, you can call it what you like, but the name you give it does not change its soundness.\r\n\r\nCan you give me an example program that will pass type checking, but go wrong at runtime with the system I am proposing?"}}
{"actor":{"display_login":"keean"}}