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

Subclass sandbox two-stage initialization #361

Open
FelixWeinreich opened this issue Sep 23, 2020 · 0 comments
Open

Subclass sandbox two-stage initialization #361

FelixWeinreich opened this issue Sep 23, 2020 · 0 comments

Comments

@FelixWeinreich
Copy link

To avoid having to create constructors on each subclass with all parameters needed for the base class initialization, we switched to two-stage initialization. However, directly afterwards, we come up with the createSkyLaunch to wrap both initialization stages in one function. The way we do that, we would need seperate functions for each subclass, each taking all parameters needed for the base class, which means we are back to our initial problem (correct me if I'm wrong here).

Could we apply one of the concepts from the prototype chapter and e.g. make it a template function? (Which btw. only works if the constructors of all subclasses take the same parameters?)

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

No branches or pull requests

1 participant