-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Domain: Prevent constructing domain with non-unique variable names #4382
Comments
I support raising an exception because we should prefer failing early. The cost of this will be unhandled exceptions at various places, but this is better than unreported errors in various places (and miscomputations later). I don't like the under-the-hood idea. |
Before we accept this enhancement, it is necessary to fix all widgets that may construct a new domain (which seems impossible). |
Problematic widgetsData widgets
Visualize
Unsupervized
Evaluate
|
Another proposal: Prevent constructing domains from tuples and lists. Create custom collection e.g. SortedSet. The collection is returned by |
Clever idea. But it would be backwards incompatible. Plus ... think about tests with hardcoded names - which are obviously unique. I'd hate having to call |
I usually remember to edit "Partially fixes ..." to "Fixes (partially) ..." to prevent closing of an issue. In #4578 I forgot. :) |
Is your feature request related to a problem? Please describe.
We have an agreement to construct domains with unique variable names, but there are no checks for that in the code.
Describe the solution you'd like
Raise an error when constructing a domain with duplicated variable names.
Describe alternatives you've considered
Create unique variable names under the hood when constructing the domain.
The text was updated successfully, but these errors were encountered: