Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base class shouldn't necessarily be abstract #66

Open
carueda opened this issue Jun 28, 2020 · 2 comments
Open

Base class shouldn't necessarily be abstract #66

carueda opened this issue Jun 28, 2020 · 2 comments

Comments

@carueda
Copy link
Owner

carueda commented Jun 28, 2020

Related with #64, the base class shouldn't necessarily be abstract, but this is currently required per the issue 64b test, which refers to this spec:

    #@define
    BaseModelConfig {
      uuids: [string]
      scaling: double
    }
    
    #@define extends BaseModelConfig
    LoadModelConfig {
      modelBehaviour: string
      reference: string
    }
    
    test.loadModelConfig = LoadModelConfig
@johanneshiry
Copy link
Collaborator

johanneshiry commented Jul 1, 2020

I dunno how much time I'll have within the next few weeks to work on this, but I agree that it might make sense to support either #@define or #@define abstract. One major change that would include #@define and allow its extension would be, that we cannot use case class anymore but we would have to go with class instead, because AFAIK case class cannot be extended.

This fact has been the main motivation to use the #@define abstract instead. I assume the logic will become far more complex if we have to check first if a specific #@define is extended (then is has to be a simple class) or not (then it can be a case class). Furthermore, having this in mind we would lose benefits provided by case classes for the simple class that is extended.

@carueda
Copy link
Owner Author

carueda commented Jul 1, 2020

Thanks @johanneshiry . Maybe it could be supported only for Java, at least initially. But no rush at all, I'll also try to find some time for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants