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

Change MetadataLike.id to return an Identifier #130

Open
dlindhol opened this issue Aug 25, 2020 · 0 comments
Open

Change MetadataLike.id to return an Identifier #130

dlindhol opened this issue Aug 25, 2020 · 0 comments

Comments

@dlindhol
Copy link
Member

There are currently places where we use string equality for DataType (a.k.a. "variable") identifiers (e.g. DataType.findVariable). Presumably we can do this via a new method DataType.hasName(name: String): Boolean.

We should be mindful of a potential use case of supporting aliases via the same hasName method (#58 ). Is there risk of being too loose with alias matching when a primary identifier match is needed? Note that this is the motivation for getVariable vs. findVariable. The former is designed to match identifiers only.

It's also worth considering whether the id method should continue to come from MetadataLike (considered experimental) or if it should belong to DataType. The only other implementor is Dataset. Is there value in factoring the concept into MetadataLike? Maybe another name? An implicit class?

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