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

map::of() should return reference to new object #2

Open
tclune opened this issue Mar 9, 2018 · 1 comment
Open

map::of() should return reference to new object #2

tclune opened this issue Mar 9, 2018 · 1 comment

Comments

@tclune
Copy link
Member

tclune commented Mar 9, 2018

currently if the key is not found, a null pointer is returned, but the underlying set has grown.

Polymorphism gets interesting in this case.

@tclune
Copy link
Member Author

tclune commented Mar 9, 2018

Polymorphism should return a new instance for the base class if it is not abstract. But if it is ... then of() should not have been used.

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