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

Members and elements #35343

bwilkerson opened this Issue Dec 6, 2018 · 0 comments


None yet
2 participants

bwilkerson commented Dec 6, 2018

The class Member is an implementation detail that clients shouldn't see. Unfortunately, it is currently a leaky abstraction, and that needs to be fixed.

IIRC, when we first implemented Member we decided that it should always be the case that a member should always compare equal to the base element of the member. I don't remember when or why (or whether) that decision was changed, but it's no longer the case. As a result, clients are resorting to (a) asking whether an element is a member and (b) getting the base element from the member.

The best solution would be for clients to never need to know about any of the implementations of Element.

The second best (that I can think of) would be to have public API for getting the "base" or "real" element from any element so that at least clients wouldn't need to reference internal classes.

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