{"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,"node_id":"MDU6SXNzdWUxNzg0NDIwNDk=","number":8,"title":"Subtyping","user":{"login":"shelby3","id":247731,"node_id":"MDQ6VXNlcjI0NzczMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/247731?v=4","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":[{"id":455055439,"node_id":"MDU6TGFiZWw0NTUwNTU0Mzk=","url":"https://api.github.com/repos/keean/zenscript/labels/Future%20Work","name":"Future Work","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":726,"created_at":"2016-09-21T19:34:08Z","updated_at":"2018-08-17T14:52:05Z","closed_at":null,"author_association":"NONE","body":"Union types express a subtyping relationship, but I am unclear as to whether typeclasses (i.e. Rust's traits) do?\n\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`?\n\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?\n\nPrior discussion:\nhttps://github.com/keean/zenscript/issues/6#issuecomment-248711828\nhttps://github.com/keean/zenscript/issues/1#issuecomment-248113585\nhttps://github.com/keean/traitscript/issues/2#issuecomment-248021713\nhttps://github.com/keean/zenscript/issues/1#issuecomment-248754649\n"},"comment":{"url":"https://api.github.com/repos/keean/zenscript/issues/comments/413891048","html_url":"https://github.com/keean/zenscript/issues/8#issuecomment-413891048","issue_url":"https://api.github.com/repos/keean/zenscript/issues/8","id":413891048,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzg5MTA0OA==","user":{"login":"shelby3","id":247731,"node_id":"MDQ6VXNlcjI0NzczMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/247731?v=4","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},"created_at":"2018-08-17T14:52:05Z","updated_at":"2018-08-17T14:52:05Z","author_association":"NONE","body":"I added:\r\n\r\n> Whereas, there is a form of unbounded dynamic polymorphism that isn’t existential quantification. That is a typeclass bounded function which is called by injecting the dictionaries dynamically instead of monomorphisation. This [is universal quantification](https://github.com/keean/zenscript/issues/8#issuecomment-413885542). Thus since existentially quantified objects sourced from an externally linked program can’t interopt at function applications with any such objects from another externally linked program in any multi-parameter typeclass bounds (because the two programs don’t coordinate on knowing each other’s union bounds) then for the most part the collections of the two objects sources could be segregated by the API they’re linking to and thus avoid the need for existential quantification."}}
{"actor":{"display_login":"shelby3"}}