{"action":"created","issue":{"url":"https://api.github.com/repos/orc-lang/orc/issues/169","repository_url":"https://api.github.com/repos/orc-lang/orc","labels_url":"https://api.github.com/repos/orc-lang/orc/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/orc-lang/orc/issues/169/comments","events_url":"https://api.github.com/repos/orc-lang/orc/issues/169/events","html_url":"https://github.com/orc-lang/orc/issues/169","id":199717280,"number":169,"title":"Improve constructor handling in Orc classes","user":{"login":"arthurp","id":88153,"avatar_url":"https://avatars.githubusercontent.com/u/88153?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurp","html_url":"https://github.com/arthurp","followers_url":"https://api.github.com/users/arthurp/followers","following_url":"https://api.github.com/users/arthurp/following{/other_user}","gists_url":"https://api.github.com/users/arthurp/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurp/subscriptions","organizations_url":"https://api.github.com/users/arthurp/orgs","repos_url":"https://api.github.com/users/arthurp/repos","events_url":"https://api.github.com/users/arthurp/events{/privacy}","received_events_url":"https://api.github.com/users/arthurp/received_events","type":"User","site_admin":false},"labels":[{"id":208537842,"url":"https://api.github.com/repos/orc-lang/orc/labels/bug","name":"bug","color":"fc2929","default":true},{"id":208537862,"url":"https://api.github.com/repos/orc-lang/orc/labels/Priority-Medium","name":"Priority-Medium","color":"fbca04","default":false},{"id":208537894,"url":"https://api.github.com/repos/orc-lang/orc/labels/Research","name":"Research","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/orc-lang/orc/milestones/7","html_url":"https://github.com/orc-lang/orc/milestone/7","labels_url":"https://api.github.com/repos/orc-lang/orc/milestones/7/labels","id":1148593,"number":7,"title":"3.0","description":"Release 3.0","creator":{"login":"jthywiss","id":5282294,"avatar_url":"https://avatars.githubusercontent.com/u/5282294?v=3","gravatar_id":"","url":"https://api.github.com/users/jthywiss","html_url":"https://github.com/jthywiss","followers_url":"https://api.github.com/users/jthywiss/followers","following_url":"https://api.github.com/users/jthywiss/following{/other_user}","gists_url":"https://api.github.com/users/jthywiss/gists{/gist_id}","starred_url":"https://api.github.com/users/jthywiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthywiss/subscriptions","organizations_url":"https://api.github.com/users/jthywiss/orgs","repos_url":"https://api.github.com/users/jthywiss/repos","events_url":"https://api.github.com/users/jthywiss/events{/privacy}","received_events_url":"https://api.github.com/users/jthywiss/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2015-06-04T02:41:36Z","updated_at":"2017-01-27T17:02:20Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-01-10T02:32:21Z","updated_at":"2017-02-01T00:57:16Z","closed_at":null,"body":"Currently constructors for classes cannot be referenced in a subclass. Instead the subclass is required to implement fields with the same names as the constructor arguments of the superclass. This is really confusing. In addition, constructors currently always bind the arguments to fields. This means that constructor arguments are always tied to the life cycle of the object even if they are not needed after field initialization completes.\r\n\r\nIdeally we would have Scala like primary constructors where subclasses need to provide the arguments as arguments to the class name when they declare the superclass.\r\n\r\nIt's not clear how to solve these problems. We need to consider several issues:\r\n* Lenient and strict constructors.\r\n* How to encode the result into the underlying theory.\r\n* Exactly how much has to be directly supported by the interpreter and what can be encoded into OIL without special support (notably Arthur expects that constructors that do not store the arguments will need special support beyond what the theory has)."},"comment":{"url":"https://api.github.com/repos/orc-lang/orc/issues/comments/276542638","html_url":"https://github.com/orc-lang/orc/issues/169#issuecomment-276542638","issue_url":"https://api.github.com/repos/orc-lang/orc/issues/169","id":276542638,"user":{"login":"arthurp","id":88153,"avatar_url":"https://avatars.githubusercontent.com/u/88153?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurp","html_url":"https://github.com/arthurp","followers_url":"https://api.github.com/users/arthurp/followers","following_url":"https://api.github.com/users/arthurp/following{/other_user}","gists_url":"https://api.github.com/users/arthurp/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurp/subscriptions","organizations_url":"https://api.github.com/users/arthurp/orgs","repos_url":"https://api.github.com/users/arthurp/repos","events_url":"https://api.github.com/users/arthurp/events{/privacy}","received_events_url":"https://api.github.com/users/arthurp/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T00:57:16Z","updated_at":"2017-02-01T00:57:16Z","body":"Introducing class constructor sites which can be called from within that class (recursively) implies that the partial constructors would need to recursively call the constructor site. However currently we do not allow defs and sites to be recursive (and partial constructors should really be defs since there is no reason for them to implicitly jump to another termination domain). We could remove the restriction and define semantics for mutually recursive groups containing both sites and defs.\r\n\r\nI don't think those semantics would be overly complex. All calls would still function as they usually do with each site call executing at it's declaration (even recursive calls) and each def call executing at the call location.\r\n"}}
{"actor":{"display_login":"arthurp"}}