Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Iox 1640 create polymorphic singleton abstraction #1656
Iox 1640 create polymorphic singleton abstraction #1656
Changes from 28 commits
2bf8488
aef2103
d88805e
2a6e336
f38f187
235739f
f2baec6
c07c569
ddbf37c
b97eeaf
4692854
90c756f
0644af9
5a6be27
7722618
78f9443
cf6dc33
65e2ec6
a26d747
d67f4dc
b2d2029
0abe2a6
f5c444b
614c94a
00486cf
3bf204b
97793c8
193b4c6
b35cb02
4c259b9
fcf639d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation this is not fully true. They can be the same. Do you think that
Interface must be the base of Default
reflects this better?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a class is always the base of itself but have to check. At some point I tried to use it with itself and it worked so this is true.
In other words, the
base_of
relation should be reflexive, at least it would be reasonable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A class is always base of itself (as intended), so
PolymorphicHandler<Default, Default>
works. The consequence is that it is not really polymorphic anymore, but you still can switch between differentDefault
instances. That is a niche feature but not detrimental and potentially useful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You misunderstood me. My point was that
Default
can be seen as the base of itself but I wouldn't say theDefault
inherited from itself. The message implies that this is the case, therefore my proposal to change the wording and usebase
instead ofinherit
.