{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2482","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2482/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2482/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2482/events","html_url":"https://github.com/Starcounter/Starcounter/issues/2482","id":54422936,"number":2482,"title":"How to handle abstract \"dynamic\" types","user":{"login":"per-samuelsson","id":2902045,"avatar_url":"https://avatars.githubusercontent.com/u/2902045?v=3","gravatar_id":"","url":"https://api.github.com/users/per-samuelsson","html_url":"https://github.com/per-samuelsson","followers_url":"https://api.github.com/users/per-samuelsson/followers","following_url":"https://api.github.com/users/per-samuelsson/following{/other_user}","gists_url":"https://api.github.com/users/per-samuelsson/gists{/gist_id}","starred_url":"https://api.github.com/users/per-samuelsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/per-samuelsson/subscriptions","organizations_url":"https://api.github.com/users/per-samuelsson/orgs","repos_url":"https://api.github.com/users/per-samuelsson/repos","events_url":"https://api.github.com/users/per-samuelsson/events{/privacy}","received_events_url":"https://api.github.com/users/per-samuelsson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Code+host","name":"Code host","color":"009800"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/G%2FDynamicSchema","name":"G/DynamicSchema","color":"009800"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/question","name":"question","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T08:17:08Z","updated_at":"2015-01-15T12:32:40Z","closed_at":null,"body":"Consider Car and CarModel in [this model](https://github.com/Starcounter/Starcounter/issues/2473#issuecomment-69332832). In #2477, we are assuring there is an instance of ```CarModel``` created for every such declaration.\r\n\r\nNow, how should we go about if ```CarModel``` is declared an abstract class?\r\n\r\na) We refuse to accept such model - the weaver will raise an error when the application is weaved, saying that classes modelling a type can not be abstract.\r\n\r\nb) We create the instance in the kernel and throw an exception when it is being read through ```Car.Model```.\r\n\r\nc)  We create the instance in the kernel and have the code host generate a concrete type extending ```CarModel``` that we use (with any abstract member have an implementation that just raise an ```NotImplementedException```.\r\n\r\nTime-wise, (a) is really simple, (b) is probably a couple of hours or so, and (c) is probably a day or two.\r\n\r\nAny thoughts? @Starcounter-Jack?\r\n"},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/70079187","html_url":"https://github.com/Starcounter/Starcounter/issues/2482#issuecomment-70079187","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2482","id":70079187,"user":{"login":"k-rus","id":1726044,"avatar_url":"https://avatars.githubusercontent.com/u/1726044?v=3","gravatar_id":"","url":"https://api.github.com/users/k-rus","html_url":"https://github.com/k-rus","followers_url":"https://api.github.com/users/k-rus/followers","following_url":"https://api.github.com/users/k-rus/following{/other_user}","gists_url":"https://api.github.com/users/k-rus/gists{/gist_id}","starred_url":"https://api.github.com/users/k-rus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-rus/subscriptions","organizations_url":"https://api.github.com/users/k-rus/orgs","repos_url":"https://api.github.com/users/k-rus/repos","events_url":"https://api.github.com/users/k-rus/events{/privacy}","received_events_url":"https://api.github.com/users/k-rus/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T12:32:40Z","updated_at":"2015-01-15T12:32:40Z","body":"I vote for a), since user should be aware that specifying `[Type]` requires ability to create instances."}}