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

document constructor chaining semantics #1

Open
gregbanks opened this issue Aug 28, 2015 · 0 comments
Open

document constructor chaining semantics #1

gregbanks opened this issue Aug 28, 2015 · 0 comments

Comments

@gregbanks
Copy link
Contributor

it's not obvious from the REAME that arguments to a class' constructor are not passed on to a superclass' constructor when atom automatically chains constructor calls. i would assume that arguments would be passed with automatic chaining, otherwise all superclass constructors (and all constructors for classes that may be subclassed in the future) have to behave like default constructors. if this is a requirement, then maybe this should be documented. on the flip side, if arguments are passed, then you end up with longer and longer parameter lists as you work your way through the class hierarchy with each subclass being beholden to the signature of its superclass constructor... also not ideal.

in any case, it seems like the final decision as to how this should work has not been made: https://github.com/carbon-io/atom/blob/master/lib/atom.js#L242

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